Solved

Ctrl+Alt+Delete

Posted on 2000-04-17
5
249 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 27

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now