How to load a form that will restrict the form itself to be minimized?
Printable View
How to load a form that will restrict the form itself to be minimized?
If you set the MinimizeBox property to False, then the user won't be able to click it. That will probably be sufficient.
I tried it man. I even hide the control box. but the windows + D short cut can minimize it. The scenario will be. it will be the only window that can be used in that computer by the user. but the administrator account can close the application
Why not set the FormBorderStyle's property to a style which doesn't include that button, like SizableToolWindow or FixedToolWindow ¿
Windows + D is a shortcut key of windows to minimize all opened windows. I've tested the 2 FormBorderStyles.. but still it minimizes
That probably has the same issues. He's trying to prevent OS overrides, which is more complicated because the app doesn't even have to know about them.
So you always want this form open, is that what you actually mean ¿
yeah.. the same feature in the groceries in which the window for the cashier is only seen and cannot be minimized.
I know you can use the SystemParametersInfo API function to block system keys such as Windows + D.
What OS are you using ¿
Windows XP, yeah I've heard that it is API but I don't know how it goes.
There are many other shortcuts, like ALT-TAB, ALT-ESC, CTRL-ESC, WIN-R, CTRL+ALT+DEL, etc.
(There's an idea - you could set your app as a windows shell instead of explorer.exe). This should do the trick and this can be done relatively easy.
could you use the Resizing event, and check the WindowState? If it's minimized, then reset it back to normal.... I think that might work.
But... I have my reservations about changing the way windows works, even for a single application.
-tg