Solved

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

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 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.

705 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