开发者

Winform - Force user to fill out form on startup

Thanks in advance for the help. I am primarily a web developer but have been tasked with creating a simple winforms application. I have the application complete with the exception of one part. This application will run on startup and prompt the user to enter a reason why they are using the machine. Is there an easy way to force the user to fill out开发者_开发问答 this form before continuing. Basically I want disable everything (start menu, etc) until this form has been filled out and closed.

Could I kill explorer.exe then restart? That seems kind of invasive to me.


Writing a custom GINA to add an extra textbox to the login screen might do it? Probably not for the faint-hearted though!


Instead of running Explorer.exe on login, you could run your own application. It is a simple setting in local computer policy to change this.

After the user is finished with your app, you could start explorer.exe or change the settings back to the default.

Here's a small tutorial how to do this.

BTW: I don't use this on any computer, but in the (terminal Services) profile of all my users, I change this to run my own app on login. This is a normal .Net winforms application, originally not designed to run as a shell.


This is impossible as a savvy user can just hit Alt+Ctrl+Del and kill the application. There is no way you can either prevent or capture this event as it is the way Windows is designed from a security perspective.


You can do a tricky thing like this:

  • Set the Form's FormBorderProperty to None, Opacity to 1% and WindowState to Maximized
  • On the Load event of this form generate a new form with your controls and show it as a dialog.

Don't sure whether it works in Windows-7 but works well in XP. This is not the proper solution, though it creates an illusion. The user can still skip this by pressing Ctl + Tab or Alt+Ctrl+Del and kill the process.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜