Jump to content

Disable ALT F4


Recommended Posts

Before anyway replies with an RFTM message, I have read the documents and understand the answer to my question.

I would like to create a program that will stop students at my school from exiting out with the ALT F4 shortcut. I was hoping to use the HotKeySet command, but after it didn't work and I did some reading up I have found that disabling the use of any command with the ALT key in is prohibited.

Firstly, is there a way to get around this using another command? I have searched for a long time, so I feel like I know the answer to that question.

Secondly, I feel like another option should be added to the HotKeySet function. If disabling the ALT key is a no go, can the function be given an option to disable the shortcut if any key specified is used i.e. {ALT}{F4} the alt is out of the question, but because F4 is listed this would stop the use of it.

This would be useful for many people despite the pitfuls that it could have for some people.

Thanks

Jeff

Link to comment
Share on other sites

  • 6 months later...

Sadly found out that SteadyState has been discontinued recently. It's still out there for download though. And this article also lists nice alternatives:

http://en.wikipedia.org/wiki/Windows_SteadyState

Link to comment
Share on other sites

Mandar's solution works really well, as long as it is either the only script is running that disables Alt-F4, or is the first run.

If someone is feeling ambitious, maybe the following could be translated into AI from VB6:

http://www.vbforums.com/showpost.php?p=3119120&postcount=2

I've had too long and brain-frying a weekend to focus on right now.

--- Edit ---

This might also be a solution (again from VB6)

// claim your program is a password protected screen saver, this disables ctrl-alt-del, alt-tab and ctrl+esc
int old;
SystemParametersInfo(SPI_SCREENSAVERRUNNING,true,(void*)&old,0);

http://forums.devshed.com/showpost.php?p=245673&postcount=4

Edited by willichan
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...