Solved

How to disable Alt-Tab, Ctrl-Esc and Ctrl-Alt-Del using VB under Win NT environment ?

Posted on 2000-03-08
3
443 Views
Last Modified: 2008-02-26
I want to disable Alt-Tab, Ctrl-Esc and Ctrl-Alt-Del while my application is running in Win NT4.0 environment. I only know VB. Can someone give me a solution, it could be in C.
0
Comment
Question by:johnlys
3 Comments
 
LVL 1

Expert Comment

by:olgat
ID: 2595446
Try the following entry in the registry.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DisableCtrlAltDel"="0"





0
 

Accepted Solution

by:
canUCme earned 50 total points
ID: 2595451
Here's code(see no C/C++ at all) all in vb( even I hate VB!)..
copy these to your program

Declarations to general
/-clip--/clip--/clip/-clip--/clip--/clip

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
/-clip--/clip--/clip/-clip--/clip--/clip

Sub rutines needed
/-clip--/clip--/clip/-clip--/clip--/clip

'This disables/enables ctrl-alt-delete and ctrl-esc

Sub DisableKeys(bDisabled As Boolean)
        Dim X As Long
        X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub

' This disables/enables ALT - <TAB>

FastTaskSwitching(bEnabled As Boolean)
  Dim X As Long, bDisabled As Long

  bDisabled = Not bEnabled
  X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub

/-clip--/clip--/clip/-clip--/clip--/clip
Call sub from yout prorgram like this
to disable ctrl-alt-del ctrl-esc and alt - tab

Call DisableKeys(True)
call FastTaskSwitching(True)

to enable ctrl-alt-del ctrl-esc and alt - tab

Call DisableKeys(False)
call FastTaskSwitching(False)




0
 
LVL 7

Expert Comment

by:KangaRoo
ID: 2595452
>> Win NT4.0
Too bad, in Win95, 98 and NT5 you could use

BOOL SystemParametersInfo(SPI_SETSCREENSAVERRUNNING,
                                UINT newval,
                                LPVOID &oldval,
                                0);
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

707 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

14 Experts available now in Live!

Get 1:1 Help Now