Solved

Ctrl+Alt+Delete

Posted on 2000-04-17
5
252 Views
Last Modified: 2010-05-02
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
Comment
Question by:dech
5 Comments
 
LVL 2

Expert Comment

by:brice123
ID: 2722164
0
 
LVL 28

Expert Comment

by:Ark
ID: 2722190
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
 
LVL 1

Accepted Solution

by:
vbkann earned 200 total points
ID: 2722202
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
 
LVL 2

Expert Comment

by:brice123
ID: 2722283
Well done vbkann... but that's exactly the same answer than me!
0
 
LVL 2

Author Comment

by:dech
ID: 2722456
Where do I put this if I have a number of forms.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question