views:

201

answers:

1

I have a double click event for a notify icon that will bring up my main form. The double click event isnt firing. Even if I put a breakpoint in the code it never gets executed. Here is what I have so far:

 Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) Handles Me.FormClosing
    Me.WindowState = FormWindowState.Minimized
    Me.Visible = False
    NotifyIcon1.Visible = True
    e.Cancel = True

End Sub

Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick

    Me.Visible = True
    Me.WindowState = FormWindowState.Normal
    Me.Activate()
    Me.BringToFront()
    Me.Focus()
    Me.Show()


End Sub

The excessive stuff is my way of trying eveything I can think of to get the form to show.

thanks in advance.

A: 

This is working when I just have a notifyicon in an app all by its self. So what I do with the notifyicon works. What else could be wrong??

Sean P