does any1 know how to make the app wen minimized to go to the system tray as a icon

Recommended Answers

All 4 Replies

Add a NotifyIcon to your project that's only visible when the main form's window state is minimized.

sory for the trouble but how

That's what the link is for. :) Here's a super short program that does it.

Public Class MainForm
  Inherits System.Windows.Forms.Form

  Private _trayIcon As System.Windows.Forms.NotifyIcon

  Public Sub New()
  End Sub

  Protected Overrides Sub OnResize(ByVal e As System.EventArgs)
    Me._trayIcon.Visible = (Me.WindowState = FormWindowState.Minimized)
  End Sub

  Private Sub InitializeComponent()
    Me._trayIcon = New System.Windows.Forms.NotifyIcon()
    Me._trayIcon.Icon = New System.Drawing.Icon( _
      "C:\Program Files\Microsoft Visual Studio 8\Common7\VS2005" & _
  End Sub
End Class


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.