Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Always Active application..

Status
Not open for further replies.

Sulik

Programmer
Dec 3, 2001
9
RU
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 :)
 
This will tell you how to do it with 95/98 but I don't know how in NT/2000. See . 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
 
Greetinx!

Try to use STSTEMMODAL form!)))

Happy programming!))
 
Er.. sorry if I'm a little stupid, but.. what could that be - SYSTEMMODAL form? :)
Could you be er.. more informative? :)
 
Greetinx!

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'.

Happy programming!))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top