can anyone please suggest a good code example of vb.net/c# code to put the application in system tray when minized.
You can leverage a built in control called NotifyIcon. This creates a tray icon when shown. @Phillip has a code example that is somewhat complete.
There is a gotcha though:
You must override your applications main form Dispose method to call Dispose on NotifyIcon, otherwise it will stay in your tray after application exits.
public void Form_Dispose(object sender, EventArgs e)
{
if (this.Disposing)
notifyIcon1.Dispose();
}
Something like that.