Trekkie_SG9

Is it possible to make your program minimize to the system tray

If possible, is there a way to make this a user-manipulated feature (e.g.: minimize normally, OR minimize / exit to the system tray)



Re: Visual Basic Language Minimizing to Tray

Daniel fred Munro

yes it is possible, i use this method

create a notify icon, give it an icon, create a command button then use this code for the command button

Private Sub CommandButton1_Click(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles CommandButton1.Click

Me.Visible = False

End Sub

to show the program when you click the tray icon

Private Sub NotifyIcon_Click(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon.Click

Me.Visible = True

End Sub

works for me, but im not sure on how to do it from the minimize button. you can also change NotifyIcon.Click to NotifyIcon.DoubleClick if you want to have to double click to show the application.

you can also go as far as using a timer to auto hide after a time period, helpful for programs you want running all the time but not front center or in the taskbar.

hope this helps somewhat..