Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Disable system keys

Posted on 2003-02-24
9
Medium Priority
?
194 Views
Last Modified: 2010-04-04
Hi
Can anybody show me an example of how to disable alt+tab, alt+shift+tab, alt+esc, ctrl+esc, windows keys.
NOT ctrl+alt+del it is ok

Under NT, 2000 and XP ?
And I just don't want to edit the policies. If you press thoose keys while my application has focus nothing should happend
0
Comment
Question by:bnz
8 Comments
 

Expert Comment

by:adrenalindx
ID: 8007661
i am having the same difficulties u r having, i ended up using policies, i no trhere is a way, it has somethin to do with gina.dll i never really bthered to look into it, anyone else ?
0
 
LVL 1

Expert Comment

by:keashF
ID: 8009104
i found this link, but it's for Win95.

http://www.delphicorner.f9.co.uk/articles/wapi12.htm

had a look at the API, there it says:

SystemParametersInfo

"SPI_SETFASTTASKSWITCH     This flag is obsolete. Previous versions of Windows use this flag to enable or disable ALT+TAB fast task switching. Beginning with Windows 95 and Windows NT version 4.0, fast task switching is always enabled."

which isn't good news, i guess

cu
keashF
0
 
LVL 2

Accepted Solution

by:
123456 earned 600 total points
ID: 8010902
Hi,
I read a question that same as you requested  ,
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20393527.html
read it may  be useful.

Best Regards
Hamid reza
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 6

Assisted Solution

by:DaFox
DaFox earned 600 total points
ID: 8012146
Hi.

It's not that easy to disable these keys on NT platform.
These are your possibilities:
- http://msdn.microsoft.com/msdnmag/issues/02/09/CQA/default.aspx
- http://msdn.microsoft.com/code/default.asp?url=/msdn-files/026/001/226/Source%20Files/DisableLowLevelKeys_cpp.asp

Best wishes,
Markus
0
 
LVL 4

Expert Comment

by:cjm30305
ID: 8018801
Set your form KeyPreview = True.

OnKeyUp event on your form do the following....

//alt+tab
if ((Key = VK_TAB)and(ssAlt in Shift))
 then
  begin
   Exit;
  end;

//alt+shift+tab
if ((Key = VK_TAB)and(ssShift in Shift)and(ssAlt in Shift))
 then
  begin
   Exit;
  end;
//alt+esc
if ((Key = VK_ESCAPE)and(ssAlt in Shift))
 then
  begin
   Exit;
  end;
//ctrl+esc
if ((Key = VK_ESCAPE)and(ssCtrl in Shift))
 then
  begin
   Exit;
  end;
//windows keys
if ((Key = VK_LWIN)or(Key = VK_RWIN))
 then
  begin
   Exit;
  end;

This will cause the procedure to exit, if any of the Windows keys, or any of the above combinations are pressed.

Hope that this helps.  It is the easiest way that I have found to do it.  
0
 
LVL 4

Expert Comment

by:cjm30305
ID: 8018962
Sorry forgot about something, and did not think it through.  Please disregard this answer as it does not work....
0
 

Expert Comment

by:CleanupPing
ID: 9317102
bnz:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 10

Expert Comment

by:kacor
ID: 9956186
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to split points between 123456 and DaFox
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

kacor
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month12 days, 10 hours left to enroll

580 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