Sys Tray

rosshodges

Freshman
Joined
Nov 23, 2002
Messages
28
I have this code

Private Sub NotifyIcon1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles NotifyIcon1.DoubleClick
If Not Me.Visible Then
Me.CenterToScreen()
Me.Show()
Me.Activate()
Me.NotifyIcon1.Visible = False
Me.ShowInTaskbar = True
End If
End Sub


Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Me.ShowInTaskbar = False
Me.NotifyIcon1.Visible = True
Me.Hide()
e.Cancel = True
End Sub

I Would like it when i click on a button for it to min to the sys tray. How can i do this i cant figure it out.

Thanks,
Ross
 
If you want to hide the form and show the system tray icon, you'd use what you already have:

Visual Basic:
Me.NotifyIcon1.Visible = True
Me.Hide()
 
Back
Top