Solved

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

Posted on 2000-03-06
14
401 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
 
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 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

22 Experts available now in Live!

Get 1:1 Help Now