Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2000-03-08
3
Medium Priority
?
476 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 100 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

636 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