Minimize to sys tray

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
 
P

psg

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;
}
}
 

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