I try to minimize my form to system tray but when I do, the form disappears and the notification icon doesnt work :(
What am I doing wrong?
Private Sub Form1_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize
If Me.WindowState = FormWindowState.Minimized Then
Me.Visible = False
NotifyIcon1.Visible = True
End If
End Sub
Private Sub NotifyIcon1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles NotifyIcon1.DoubleClick, NotifyIcon1.BalloonTipClicked
Me.WindowState = FormWindowState.Normal
Me.Visible = True
NotifyIcon1.Visible = False
End Sub
I initialize NotificationIcon text, balloon tip and other stuff in the aspx page