Solved

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

Posted on 2000-03-06
14
404 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

914 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

17 Experts available now in Live!

Get 1:1 Help Now