Private voidExit Toolstripmenuitem_click (Objectsender, EventArgs e)//Exit Menu Method { //This . Close ();Application.exit ();//We recommend that you use this close statement } Private voidTimer1_Tick (Objectsender, EventArgs e)//Time Method{Toolstripstatuslabel1.text=DateTime.Now.ToString (); } Private voidForm1_Resize (Objectsender, EventArgs e)//the effect of the maximum minimum change in the window { if( This. WindowState = =formwindowstate.minimized) {notifyicon1.visible=true; This. Visible =false; } Else{notifyicon1.visible=false; This. Visible =true; } } Private voidForm1_Load (Objectsender, EventArgs e) { //if (this. WindowState = = formwindowstate.minimized)//{ //ShowInTaskbar = false; //} } //private void Notifyicon1_mousedoubleclick (object sender, MouseEventArgs e)//{ //This . Visible = true; //This . WindowState = Formwindowstate.normal; //} Private voidNotifyicon1_doubleclick (Objectsender, EventArgs e)//Small icon-related settings in the lower right corner { This. Visible =true; This. WindowState =Formwindowstate.normal; } Private voidShow Toolstripmenuitem_click (Objectsender, EventArgs e)//Double-click the bottom right icon to display the program window{Notifyicon1_doubleclick (sender, E); }
07 the menu and the lower right corner of the small icon of the exercise