Minimize to sys tray

  • Thread starter Thread starter Xarky
  • Start date Start date
X

Xarky

Hi,
I followed the follwoing post to minimize application to system
tray.
http://groups.google.com/groups?hl=...osoft.public.dotnet.languages.csharp&start=25

Now, when application is in system tray, I tried to double click on it
to open, but its not opening. I added the following code

private void trayIcon_DoubleClick(object sender, System.EventArgs e)
{
this.WindowState = FormWindowState.Normal;
this.ShowInTaskbar = true;
shown = true;
trayIcon.Visible = false;
} // end method trayIcon_DoubleClick

but the result was nothing.

Can someone help me out
 
Xarky said:
Now, when application is in system tray, I tried to double click on it
to open, but its not opening.

I use:
-----------------------------------------
private void notifyIcon1_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
this.Show();
this.Activate();
if (this.WindowState == FormWindowState.Minimized)
{
this.WindowState = FormWindowState.Normal;
}
}
 
Back
Top