I need to write an application which has to be unable to switch from, to close or to end with a Task Manager.
It has to be always Active, to not let the user do anything aside this application.
Thanks
. James P. Cottingham
I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
I assume you don't have an exit item in your menu.
You can set an action to not allow the window to close when the user tries to use the system menu Close item or Alt-F4.
Put the following line in the OnClose event of your main form:
Action = caNone;
Then the only way to close the application is through the Task Manager.
Thanks a lot, guys
But the main problem is I'm using Windows XP.. just forgot to mention it..
I followed the instructions about registering the process.. it does work (i mean it launches without any warnings), but it doesn't do what it is supposed to do.
Just a SLIGHT oversite ;-) . I don't have access to XP but I'll still try to help. What is it not doing that it is supposed to. James P. Cottingham
I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
Well, it doesn't disable the Task Manager's ability to end the process. And that's not what I supposed to get, kekeke
Hmm.. and what's more, I'd like to know how to make my application to be always on-top of other windows, to not let the user to switch applications, to make him work ONLY in MY application.. i'm a bit jealous about it, you know ;p
If you defines your main form with SYSTEMMODAL flag, so that form has only always focus and any other app can not be either executed or switched to before your form will be closed.
For more information to how to make a form as SYSTEMMODAL see MSDK. See topic 'CreateWindow at DS_SYSMODAL style description, or topic 'SetSysModalWindow'.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.