tags:

views:

79

answers:

0

I have strange behaviour with my app after run it on Windows 7. It's connected with NotifyIcon while app is minimized.

What should happens:

1) Click once on icon with mouse left button then Balloon with some text should appears

2) Double click on icon will show again app window

On Windows 7 MouseDoubleClick is also fired but window is not showing. I don't know why. The same code works good on Windows XP.

private void notifyIcon_MouseClick(object sender, MouseEventArgs e)
{
    if (e.Button == MouseButtons.Left)
    {
        this.NotifyIconShowBalloonWithData();
    }
}

private void notifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)
{
    this.Show();
    WindowState = FormWindowState.Normal;
    notifyIcon.Visible = false;
}

What did I wrong? :)