Solved

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

Posted on 2000-03-06
14
407 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
oracle global variables 4 68
Delphi inherited method 6 68
Dev express lookupcombo 3 26
Why  'Host Connection unavailable/Socket Error #113 No route to host' 6 39
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 my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

774 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