|
-
Dec 11th, 2001, 01:05 PM
#1
Thread Starter
Member
Icon in system tray
Is there a way to find out if the icon that I placed in the system tray via an API call is still there?
If not
Is there a way to find out if the system tray is there?
-
Dec 11th, 2001, 02:36 PM
#2
An icon in the system tray represents a running application. All you would need to do is check to see if that application was, in fact, running.
I don't understand, however, what you mean by this
Is there a way to find out if the system tray is there?
-
Dec 11th, 2001, 06:16 PM
#3
Thread Starter
Member
-
Dec 12th, 2001, 05:52 PM
#4
Thread Starter
Member
To whom this might interest....
I finally resolved my problem and here is some information to whoever encounters the same problem:
As far as I know Windows will send a message to all opened applications and ask them to close up.
From my testing I got to the conclusion that my form is going through the Form_Unload event when the user logs off.
In this event I has some clean up code, then END. Well apparently the END is what was crashing the service. I just figured that since the form is being unloaded anyways there wouldn't be a difference if I also ended the application there, since my application can't run without it. (I tryed to unload the form by code and the application does crash (this is without the END in the event)).
So how can Windows make my form go through its Form_Unload event without crashing the whole thing? To my knowledge if a form unloaded all its procedures, Properties and events are not accessible unless the form is reloaded. I think I am more comfused than ever... If I missed something could someone please explain.
-
Jan 15th, 2002, 07:46 AM
#5
New Member
I am not sure if you are still woking on the project but maybe this can shed some light, When you logoff windows kills the system tray so if you were to have a system tray icon it would be gone but your app if its a service would still run. when the user logs back in the system tray is recreated by windows and your app would have to get this info and readd its icon to the sytem tray. I had this problem but resolved it.
-
Jan 15th, 2002, 05:30 PM
#6
Thread Starter
Member
Actually no I'm done with that project, but thankx anyways for the info.
You are right about the system tray no longer existing on user logoff. In fact it all depends on how your service is configured in the services applet.
If its running under the system account you can allow it to interact with the deskop. (There are annoying limitation with this option: The one I experienced is known, but very frustrating. The system account can not access the printers. So since my service needed to use a printer driver I could not use this option)
But if you run it under a user's account then it will not be able to access the system tray or even display a form. Yes, it will run, but without an interface. If you have nothing to display, that's fine, but how is the user supposed to interat with the service. Correct me if I'm wrong ,but you can't even display an icon in the system tray. The user can only start and stop it from the services applet?? That's crappy.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|