Solved

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

Posted on 2000-03-08
3
462 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

696 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