I am developing a small application that enable users to surf at a fee. Now, I want this user(s) to remain logged in as Administrator but when the application is running, I want the following keys to be disabled : Ctrl+Esc,Windows keys,Ctrl+Alt+Delete, Alt+Esc.
I only want the Supervisor access these keys after ending the application by inputting a password that ends it. Pls help.

You are going to have to write a global hook and use SetWindowsHookEx. The procedure that does it will need to be compiled into a DLL (a regular application process is not permitted to use global hooks). Your application can then use the DLL to install the hook and remove it when it terminates.

I'm not sure you can trap CTRL+ALT+DEL, but I don't remember for sure either way.

Good luck.

Thanks a lot 4 ua help. But your solution seems to be too technical 4 me. Please still provide me with more information on how to go about it.

You are trying to do something that windows is designed against permitting. So it will be a very technical problem.

If you want more information type "setwindowshookex" in the Delphi IDE, place the cursor on the word, and press F1.

You are going to have to learn how to use this stuff for yourself. (Sorry, I can't spare to write it for you.)

If you want help along the way, post back here.

Good luck.

Thx a lot Duoas. Problem solved. Your contribution was very useful indeed. Now, I have a problem. I want the application to cut off communication with the server if Internet connection terminates. I mean the application should end the surfing session immediately the Internet is not available and stop charging the client.
Thanks in advance.

Cheers.

I'm not sure...

You should receive an empty message if the server terminates.

Glad to be of help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.