|
-
Sep 12th, 2001, 11:26 PM
#1
Thread Starter
New Member
cancel logoff
My question is if my application is running and the user tries to
logoff or shutdown he should not be able to do it.
-
Sep 13th, 2001, 09:25 AM
#2
To prevent users from getting or starting other windows set your from to system modal, it blocks ALT-TAB:
Code:
Declare Function SetSysModalWindow Lib "User" (ByVal hwnd%) As Integer
i = SetSysModalWindow(From1.hwnd)
You still have to block CTRL-ALT-DEL. Do a search on this forum. Lots of good answers on how to do this.
PS: the type of app you're making had better tell users it has locked the sytem and actively shows that its doing something.
It's the kind of thing that makes users angry - angry enough to unplug the PC, because they think it's locked up. My best advice is DON'T DO IT.
-
Sep 14th, 2001, 06:45 AM
#3
For Win9x systems you can stop ctrl-alt-del with:
Code:
Private Declare Function SystemParametersInfo Lib _
"user32" Alias "SystemParametersInfoA" (ByVal uAction _
As Long, ByVal uParam As Long, ByVal lpvParam As Any, _
ByVal fuWinIni As Long) As Long
Private Const SPI_SETSCREENSAVERRUNNING = 97
' DISABLED = TRUE TO DISABLE CTRL-ALT-DELETE
' DISABLED = FALSE TO RE-ENABLE
Dim lRet As Long
lRet = SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, _
Disabled, 0&, 0&)
I do not know how to do this on NT
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|