简体   繁体   中英

How do I make a window compulsory for the user to enter some information?

At my workplace, I need to create a questionnaire that is compulsory for the user to fill out. The aim is to make it as non-intrusive to the user as possible and link it to their Windows account. The results will then be stored in a database where reports can be generated off of the responses.

The suggestion was to load the questionnaire at login time, ie when the user logs onto the computer. I would have to make the window exclusive so that no other windows could be interacted with.

My question how would I go about doing this? Could this be done with WPF or would I need XNA or something similar?

Also, are there any other suggestions on how I could meet all the criteria with a different implementation?

Is there a way to run/activate an application at screen unlock?

You can create an app with WinForms or WPF. I don't know about XNA. :) And you can load it on startup; by using Registry. You may need to manually disable ALT + Tab, using API, to disable the interaction between other windows.

First off, it appears you may have conflicting requirements - "non-intrusive" and "compulsory" - to a user any interruption can be considered a violation of their sacred time :)

I would use a Maximized WPF Window that allows transparency, has no window style, fairly transparent to look like the background is disabled. The "form" area would be centered on the screen. The form, once filled out, would close and set a per-user state in a settings.config file to ensure the next time the user logs in it doesn't show up again.

Anuraj has it right to attempt to disable as much interaction as possible via the supression of special keystrokes.

I would suppress the keystrokes by marking the KeyEventArgs as handled upon the raising of the PreviewKeyDown event.

I've never done this on multiple monitors, though, don't know how that would look.

Compulsory is done by, as you say linking it to their domain accounts, and then giving anyone a written warning who has not completed the questionnaire in some time frame.

If you are not willing to back your "compulsory" requirements with actual discipline procedures then implementing technical obstructions is a waste of time. With discipline procedures in place, technical obstructions are unnecessary to achieve compliance.

The actual implementation would probably be best done on the corporate intranet server as a web-form.

This of course requires that the company is mature enough to be using a central login server of some kind (domain controller if windows) and has a corporate intranet.

Now is a good time to start perhaps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM