Minimize problem when using minimize to system tray

  • Thread starter Thread starter shawrie
  • Start date Start date
S

shawrie

Hi

can someone help?
I have some code that on startup minimize's the form and puts it in
the system tray. This part works fine and i can see my icon in the
system tray. If the user chooses to restore the form and then minmize
it i get just the title bar of the form at the bottom of the desktop
instead of minimizing to the system tray again

Neil
 
shawrie said:
Hi

can someone help?
I have some code that on startup minimize's the form and puts it in
the system tray. This part works fine and i can see my icon in the
system tray. If the user chooses to restore the form and then minmize
it i get just the title bar of the form at the bottom of the desktop
instead of minimizing to the system tray again

Neil

What is the code you are using to "restore" and "minimize" the form?

Just minimizing a form won't work. You have to control minimizing to the
system tray by "hiding" (this.Hide() or Me.Hide()) the form and then setting
the Visible property on the NotifyIcon instance to show it in the system
tray.

HTH,
Mythran
 
Please post a code fragment that contains your minimize logic.
I suspect you're not showing your app's system tray icon in your
minimize handler.

/ravi
 
Back
Top