Originally Posted by
omanel
I've just remembered it while writting the code, thanks anyway
My application is almost ready, now all i've left to do is to get it to minimize in system tray and i guess it's easy, problem is solved!
Thanks to everyone who helped me once again!
Minimize to tray
Form Load (Set Icon)
Code:
Code:
Me.NotifyIcon1.Icon = Me.Icon
Form Load, Set it true
Code:
Code:
Me.NotifyIcon1.Visible = true
VB Syntax for Minimizing to System Tray
Code:
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
NotifyIcon1.Visible = False
End Sub
Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
Try
Me.Show()
Me.WindowState = FormWindowState.Normal
NotifyIcon1.Visible = False
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
Try
If Me.WindowState = FormWindowState.Minimized Then
Me.WindowState = FormWindowState.Minimized
NotifyIcon1.Visible = True
Me.Hide()
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Show Balloon Tip
(use on minimize, but can be adjusted for anything
Code:
Code:
notifyIcon1.ShowBalloonTip(3000, "Your App", ("Application has not closed" & DirectCast((1
Credits: VB Snippets Vault You can always check stickies and ask for help if your stuck.