Compulsary Form

bluejaguar456

Freshman
Joined
Aug 22, 2006
Messages
48
Hi Everyone!

I was jsut wondering if there was a way to bring a form tothe front of the desktop, just like the shutdown menu on windows xp. i mean like for example when you click on the turn off computer button in XP you have to click on the dialog box to chose what you want to do (shutdown, restart etc) and you cant click on anything else until this has been done. i wan a form like this. the reason for this is my family take any chance they can to get on my computer because it is the only one that is good in my house hold. want my program to be like that because i am going to have it with 4 boxes where you have to enter a pin number in order to exit out of it.

Please can some help?

Thankyou in Advance
 
I believe there is an 'always on top' property for windows forms.

But if you want to prevent people from using your computer you should log out and require a password/username to log back in. There's stuff already built into windows that does this a lot better than anything you or I could implement easily. Check out 'user accounts' in the control panel.
 
The 'Always on Top' property simply puts your form on top of forms which aren't 'Always on Top' - these forms however can still be placed in front of each other.
I'm with mskeel on this one - simply set up user accounts with their own passwords for the other users but don't give them permissions to shut down the PC.
 
Yes i know that i could do that quite easily but i want me work to stay visible in the background for me so that i can easily just enter my pin n the computer is unlocked again easy peasy lol that is they way that i would prefer to do it do you guys know of a way?

Thanks
 
Not easily unfortunately - the ability for a single app to effectively render the entire PC unusable like that would make a DOS attack such a simple thing to do.

It is exactly this reason why things like the ability to lock a workstation or XP's Fast User Switching were implemented at the OS level.

For your needs it would probably be far simpler to use multiple accounts and the ability to switch users to prevent people either abusing your PC or messing with your documents.
 
Windows provides another feature that provides this kind of functionality: a screen saver. If you specify a screen saver password and a reasonably short delay before the screen saver is shown then in order to use the computer a password would be required. You can even create a shortcut to the screen saver on your desktop (if you look in the System32 folder, they have the extension .scr) so you can run the screen saver without waiting.
 
Back
Top