Hi
I hope someone will be able to solve my problem...
I develop winForm application,
when it being minimized - it's supposed to appear as an icon instead of taskbar. My code:
private void BaseForm_SizeChanged(object sender, EventArgs e)
{
notifyIcon1.BalloonTipTitle = "Our Program";
notifyIcon1.BalloonTipText = "still working... ";
if (FormWindowState.Minimized == this.WindowState)
{
notifyIcon1.Visible = true;
this.ShowInTaskbar = false;
notifyIcon1.ShowBalloonTip(500);
}
else if (FormWindowState.Normal == this.WindowState)
{
notifyIcon1.Visible = false;
}
}
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
notifyIcon1.Visible = false;
this.WindowState = FormWindowState.Normal;
this.Show();
Login loginFrm = new Login();
loginFrm.ShowDialog();
}
Now something strange happends: the program is being minimized as requested,
but when I want to double-click the icon - it disappears !!
Means: When my mouse arrow hover on the icon (without any click!) - the icon is gone and
never come back, so that I have to run the application from the begining.
I'll just mention 2 notes:
1. I've checked - there's no any Hover Event active.
2. I've checked the code in separate project and it was fine.
Can someone tell me what's going on? And what can I do?
I'll appriciate your help.
Tali.