- Drag a NotifyIcon onto your form.
- Set the NotifyIcon.Icon property to your icon to be displayed in the system tray.
- Change the NotifyIcon.Visible property to false.
- Insert the following code into your program:
Private Sub Form1_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize
If Me.WindowState = FormWindowState.Minimized Then
Me.ShowInTaskbar = False
NotifyIcon1.Visible = True
End If
End Sub
'Make the program return from the system tray when the icon is double clicked:
Private Sub notifyIcon1_dblClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NotifyIcon1.DoubleClick
Me.ShowInTaskbar = True
NotifyIcon1.Visible = False
Me.WindowState = FormWindowState.Normal
End Sub
Hope this Helps thumb up!