Jump to content
xisto Community
Sign in to follow this  
p_a

Disable Alt+tab Using .net

Recommended Posts

Is this possible? Number of webpages I visited said - simply no. But having in mind new structure of .NET, I hope there would be a possibility to disable ALT+TAB, or CTRL+ALT+DEL at the webpage.Why to disable it? Sometimes in educational institutions tests and quizes are based on website server with client browsers on students computers. To avoid possibility of starting another program, or changing current application, there should be a possibility of disabling ALT-DEL for example. Is the keyboard combination under protection of the operating system?

Share this post


Link to post
Share on other sites

This code comes from a Post in developerfusion.uk.... I have myself controlled other keys but not exactly in this fashion. This will work for almost all other keys that you would want to control.

Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long


Private Sub disablekeys(disable As Boolean)
SystemParametersInfo 97, disable, CStr(1), 0
End Sub


Private Sub disablek_Click()
disablekeys True
End Sub

Private Sub enablek_Click()
disablekeys False
End Sub

Share this post


Link to post
Share on other sites
Code not working !Disable Alt+tab Using .net

Have u test your code ?, it does not work at all. I have change Long into integer but it does not work too...

-reply by Jacob

 

Share this post


Link to post
Share on other sites

Is this possible? Number of webpages I visited said - simply no. But having in mind new structure of .NET, I hope there would be a possibility to disable ALT+TAB, or CTRL+ALT+DEL at the webpage.

 

Why to disable it? Sometimes in educational institutions tests and quizes are based on website server with client browsers on students computers. To avoid possibility of starting another program, or changing current application, there should be a possibility of disabling ALT-DEL for example.

 

Is the keyboard combination under protection of the operating system?

May I give you a idea please, I suggest you consider subclassing Form or something similar else to capture and then process some Windows messages. You may have a look at https://support.microsoft.com/en-us/kb/815774.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.