It's the simplest!
1. Add a NotifyIcon control to the form
2. Put icon.ico this icon in the/bin/debug directory
Using System;
Using System.Collections.Generic;
Using System.ComponentModel;
Using System.Data;
Using System.Drawing;
Using System.Text;
Using System.Windows.Forms; namespace Minimizeform {public partial class Form1:form {public Form1 () {Initiali
Zecomponent (); } private void Form1_Load (object sender, EventArgs e) {this.notifyicon1 = new system.windows.
Forms.notifyicon (this.components);
Notifyicon1.icon = new icon (application.startuppath "//icon.ico");//Specify an icon notifyicon1.visible = false;
Notifyicon1.click + = new System.EventHandler (This.notifyicon1_click); This. SizeChanged + = new System.EventHandler (this.
form1_sizechanged); } private void Form1_sizechanged (object sender, EventArgs e) {if (this. WindowState = = formwindowstate.minimized)//Minimize {this.
ShowInTaskbar = false; This.notifyiCon1.
Visible = true; }} private void Notifyicon1_click (object sender, EventArgs e) {if (this. WindowState = = formwindowstate.minimized) this.
WindowState = Formwindowstate.normal; This.
Activate ();
This.notifyIcon1.Visible = false; This.
ShowInTaskbar = true; }
}
}