Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.90 KB | None | 0 0
  1.       Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2.  
  3.       NotifyIcon1.Visible = False
  4.  
  5.       End Sub
  6.  
  7.        
  8.  
  9.       Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
  10.       Try
  11.  
  12.       Me.Show()
  13.  
  14.       Me.WindowState = FormWindowState.Normal
  15.  
  16.       NotifyIcon1.Visible = False
  17.  
  18.       Catch ex As Exception
  19.  
  20.       MsgBox(ex.Message)
  21.  
  22.       End Try
  23.  
  24.       End Sub
  25.  
  26.       Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
  27.       Try
  28.       If Me.WindowState = FormWindowState.Minimized Then
  29.       Me.WindowState = FormWindowState.Minimized
  30.       NotifyIcon1.Visible = True
  31.       Me.Hide()
  32.       End If
  33.       Catch ex As Exception
  34.       MsgBox(ex.Message)
  35.       End Try
  36.       End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement