Solved

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

Posted on 2000-03-06
14
411 Views
Last Modified: 2010-04-04
I want to disable Alt-Tab, Ctrl-Esc and Ctrl-Alt-Del while my application is running in Win NT4.0 environment. Can someone tell me how to do it by using visual basic ? Thank you.
0
Comment
Question by:johnlys
  • 5
  • 4
  • 2
  • +3
14 Comments
 
LVL 10

Expert Comment

by:Lischke
ID: 2587040
Hi John,

firstly, this is a Delphi forum so you will very likely find nobody to answer your question. I recommend to use the Visual Basic forum. See the left side of the page you are just reading. In the list of the most active topic areas you see at place one Visual Basic.

Secondly, stop this underdog thinking. Windows (NT) is a multitasking system and everyone expects to use it as such. Limiting it to one application is extremly oldfashioned and DOS like, I wouldn't even consider doing it (and you shouldn't do to if you ever want to get beyond the beginner level). Don't be annoyed. It's just a well meant tip...

Ciao, Mike
0
 

Expert Comment

by:doncov
ID: 2587381

Only for Win95. locked key: Ctl-alt-del
bool old; SystemParametersInfo (SPI_SCREENSAVERRUNNING,1,&old,0) To include back: SystemparametersInfo (SPI_ScreenSaverrunning,0,&old,0)
0
 
LVL 2

Expert Comment

by:saar071697
ID: 2587468
you forgat to disable the ALT+TAB
Systemparametersinfo(SPI_setfasttaskswitch,1,&old,0);
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
LVL 2

Expert Comment

by:saar071697
ID: 2587470
you forgat to disable the ALT+TAB
Systemparametersinfo(SPI_setfasttaskswitch,1,&old,0);
0
 
LVL 17

Expert Comment

by:inthe
ID: 2588228
Hi
none of above is any good for nt though..
for win9* look up the MS Knowledge base article.
HOWTO: Disable Task Switching on Win32 Platforms
Article ID: Q226359
 
 
Note that you can't disable Ctl-Alt-Del on NT unless you provide some form of NT keyboard filter driver.  This would involve learning NT Device Driver writing and NT Drivers are wrote in C/C++ not vb .

as lische said anyway nt is a multitask environment so if your app is the only one to be run on it you be better off switching to win9* instead where you can disable these keys with ease.
0
 

Author Comment

by:johnlys
ID: 2588310
I still believe there is way of doing it with VB.
0
 

Author Comment

by:johnlys
ID: 2588332
I still believe there is way of doing it with VB.
0
 
LVL 17

Expert Comment

by:inthe
ID: 2588342
hahahahahahha
 
some one is disillusioned..

vb is far less powerful than delphi and even in delphi it is one the hardest things too do.

you certainly wont find an answer in the delphi section for 50 ponts.
try asking this question in vb forum instead
note:
 you will get the same answer there...
0
 
LVL 17

Expert Comment

by:inthe
ID: 2588367
excerpt from ms knowledge base:
"
The low level keyboard hook can also detect CTRL+ALT+DEL, but it cannot disable it.
"

http://support.microsoft.com/support/kb/articles/Q125/6/14.asp
0
 
LVL 3

Expert Comment

by:smurff
ID: 2591430
I found this, dont know if its any good but its here if you want to use it.
Good luck!

First, put this declaration in the implementation of your form:



 function RegisterServiceProcess (dwProcessID, dwType: DWord) : DWord;
   stdcall; external 'KERNEL32.DLL';

 
Now, to hide it:



   RegisterServiceProcess(GetCurrentProcessID,1);



Show it again:



   RegisterServiceProcess(GetCurrentProcessID,0);

 
0
 
LVL 17

Expert Comment

by:inthe
ID: 2592393
the is exactly what calling SPI_ScreenSaverrunning does..screensaver in turn calls RegisterServiceProcess ..

again win9* only not nt...
0
 

Author Comment

by:johnlys
ID: 2593630
OK dear inthe you win the 50 points.

Now I want to give another 100 points, if anyone can give me an instant solution of how to disable these hot keys. I can't change the OS to win95. As inthe said may be some kind of keyboard filter driver would help. To be frank I don't know how to write this. Can you write one for me you may use C for this driver. If I prove it works you will get the 100 points. Thank you.
0
 
LVL 17

Accepted Solution

by:
inthe earned 50 total points
ID: 2594889
ok.

about the driver.
probably the best place to ask is here:

http://www.experts-exchange.com/Computers/Programming/Languages/C++/

they will know this topic better and be able to help more.
tell them you are a vb programmer and you need disable keys on nt they may know of a driver you can use or help write one for you..

ps ,
do you know about vb forum ?
it is here:
http://www.experts-exchange.com/Computers/Programming/Windows/Visual_Basic
0
 

Author Comment

by:johnlys
ID: 2595088
Thank you so much for all the experts' answers & suggestion. I like this web site very much.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Title # Comments Views Activity
Delphi application Soap connection 5 120
LAN or WAN ? 11 95
How to Get Images From Server using App Tethering 11 39
how to make 2 step back? ..\..\ ExtractFilePath (paramstr(0)) 5 51
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

856 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