Support Forums
[Mini Tut] How to Minimize to Icon on Task Bar [mini Tut] ( Great For MSN Freezers ET - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: [Mini Tut] How to Minimize to Icon on Task Bar [mini Tut] ( Great For MSN Freezers ET (/showthread.php?tid=13391)



[Mini Tut] How to Minimize to Icon on Task Bar [mini Tut] ( Great For MSN Freezers ET - Trihunter3 - 11-01-2010

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:

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.

[Image: euh460.jpg]


RE: [Mini Tut] How to Minimize to Icon on Task Bar [mini Tut] ( Great For MSN Freezers ET - Marikā„¢ - 11-04-2010

Do you mean the Tray icon? If so, then there was no need for a tutorial on this.
Everyone knows this already.


RE: [Mini Tut] How to Minimize to Icon on Task Bar [mini Tut] ( Great For MSN Freezers ET - Pyratepig - 12-22-2010

I didn't .....


RE: [Mini Tut] How to Minimize to Icon on Task Bar [mini Tut] ( Great For MSN Freezers ET - Mammoth - 04-18-2011

Lol Marik this forum is used to inform people as i am a quite good VB.net coder and i dint know this good job.