Notifyicon, and a closed form

C

Chris Soulsby

Hi,

I've wrote an application so that when you close the form it will leave a
process running so that the startup time is much quicker the next time
around. To allow the user to kill off this process i've added a notify icon
in the system tray with a "close" menu option.

This menu works fine when the form is open but soon as it is closed the
context menu stops working and the notifyicon class seems to no longer
receive any onclick events.

Does any one know how to solve this problem?
 
S

Sijin Joseph

Are you sure you are just hiding the form and not actually closing it. For
the notifyIcon to work correctly, the Mainform of the application should not
be closed.

i.e. u should be using form.Hide() rather than form.Close()
 
C

Chris Soulsby

I'm closing the form not hiding it. I think i'll try changing the code and
hide it instead. Thanks for the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top