11-01-2010, 07:54 PM
I Posted this on hackforums and i want to bring it here:
This is a Small Mini Tut on how to minimize an program to look like an icon on the task bar.
( Like msn has the little man)
1. Open A new Form / Use the form you want this to work on.
2. Drag and Drop the tool named Notify Icon 1 on the Form.
3. Click on that and in Text Write what you want it to say when the mouse is pointed over it.
4. Now There should be an option to the right named Choose icon.
5. Click it and choose the icon you want it to show.
6. Now Double click the form and put this code in it:
7. After that, double click the Notify icon 1 tool and paste this code in it:
Make sure you highlight EVERYTHING under
EXECPT END CLASS.
Make Sure End class is at the end of the code and debug and you shall get this when you minimize.
This is a Small Mini Tut on how to minimize an program to look like an icon on the task bar.
( Like msn has the little man)
1. Open A new Form / Use the form you want this to work on.
2. Drag and Drop the tool named Notify Icon 1 on the Form.
3. Click on that and in Text Write what you want it to say when the mouse is pointed over it.
4. Now There should be an option to the right named Choose icon.
5. Click it and choose the icon you want it to show.
6. Now Double click the form and put this code in it:
Code:
NotifyIcon1.Visible = False
7. After that, double click the Notify icon 1 tool and paste this code in it:
Make sure you highlight EVERYTHING under
Code:
Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
EXECPT END CLASS.
Code:
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
Make Sure End class is at the end of the code and debug and you shall get this when you minimize.