Windows End Process from Task Manager Event

Hi!

I have a trayicon for my application that works nice. If you close the app form the close menu it closes the app and also removes the icon as I coded it.

Now I want to find out how to remove the tray icon when someone kills the app like from the task manager? Is there an event for that? Im trying to use the onExit event but that does not seem to work.

How must this be done?

This is wha tI have in the app class:

def OnExit(self):

	# When app.MainLoop() returns, MessageLoopWork() should

	# not be called anymore.

	if not USE_EVT_IDLE:

		self.timer.Stop()

	self.tbicon.Destroy()

thanks!

Disclaimer: The information in this email is
confidential and may be legally privileged. It is intended solely for the
addressee and access to this email by anyone else is unauthorised. If you are
not the intended recipient, any disclosure, copying, distribution or any action
taken or omitted to be taken in reliance on it, is prohibited and may be
unlawful. When addressed to our clients, any opinions or advice contained in
this email are subject to the terms and conditions expressed.

P Please consider the environment before printing this email and/or
any related attachments

Public Display Technologies (Pty) Ltd is a
Level 1 BBBEE Contributor and a Value Adding Enterprise (135%)

Herman Stander wrote:

Now I want to find out how to remove the tray icon when someone kills
the app like from the task manager? Is there an event for that? Im
trying to use the onExit event but that does not seem to work.

How must this be done?

Surprisingly, it cannot be done. Even the most well-bred applications
leave dangling icons in the tray when they expire unexpectedly.
Hovering over the dead icons with the mouse removes them.

ยทยทยท

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.