?
Solved

Ctrl+Alt+Delete

Posted on 2000-04-17
5
Medium Priority
?
255 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
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 600 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: 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.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month10 days, 3 hours left to enroll

762 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