[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

Ctrl+Alt+Delete

When a program is running, I need a way of stopping users shutting down the program by pressing Ctrl+Alt+Delete.
But I dont want to go too low level.
I will increase points for a really good answer.
0
dech
Asked:
dech
1 Solution
 
ArkCommented:
Be carefull with SPI_SCREENSAVERRUNNING - take a look at previous question (11 strings below yours)

May be microsoft knows :-)

Q161133 - HOWTO: Block CTRL+ALT+DEL and ALT+TAB in Windows 95 or Windows 98
http://support.microsoft.com/support/kb/articles/Q161/1/33.asp

Cheers
0
 
vbkannCommented:
Declarations
Copy this code into the declarations section of your project.

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        
Code
Sub DisableCtrlAltDelete(bDisabled As Boolean)
    Dim X As Long
    X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub
       
Use
To disable Ctrl-Alt-Delete:

Call DisableCtrlAltDelete(True)        
To enable Ctrl-Alt-Delete:

Call DisableCtrlAltDelete(False)        
0
 
brice123Commented:
Well done vbkann... but that's exactly the same answer than me!
0
 
dechAuthor Commented:
Where do I put this if I have a number of forms.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now