06-10-13, 08:41 PM
كود :
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
NotifyIcon1.Icon = Me.Icon
End Sub
Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
If Me.WindowState = FormWindowState.Minimized Then
Me.ShowInTaskbar = False
NotifyIcon1.Visible = True
ElseIf Me.WindowState = FormWindowState.Normal Then
Me.ShowInTaskbar = True
NotifyIcon1.Visible = False
End If
End Sub
Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
Me.WindowState = FormWindowState.Normal
End Sub
