I have a form which disables Ctrl+Alt+Del, but I can't remember how to make the taskbar invisible so that the user can't execute any other program while the form has focus. In other words, I want my form to take control of the whole screen.
Printable View
I have a form which disables Ctrl+Alt+Del, but I can't remember how to make the taskbar invisible so that the user can't execute any other program while the form has focus. In other words, I want my form to take control of the whole screen.
Set BorderStyle to 0 then Maximize form!
Public Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Public Const HWND_TOPMOST = -1
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOSIZE = &H1
Public Const SWP_HIDEWINDOW = &H80
setwindowpos taskbarhwnd,0,0,0,0,0,swp_hidewindow
setwindowpos yourformhwnd, HWND_TOPMOST,0,0,screen.width,screen.height
Thanks for the quick response!
Don't forget that won't work under NT/2K/XPQuote:
Originally posted by dcronje
I have a form which disables Ctrl+Alt+Del,
It doesn't?
So you cannot unregister certain hotkeys anymore?
yeah you can un/register hotkeys, but NT-based OS will ignore attempts to stop ctrl+alt+del