Introduction - If you have any usage issues, please Google them yourself
C# system tray program source code examples and knowledge points: 1, add a NotifyIcon component and a ContextMenuStrip component to the main form 2, set the control' s ContextMenuStrip property notifyIcon1 contextMenuStrip1, the user clicks on the tray icon to display a menu point contextMenuStrip1 3, notifyIcon1 . Visible = true // display the tray icon 4, this.ShowIcon = true // application window is displayed icons 5, this.ShowInTaskbar = true // whether to display an icon in the windows task bar 6, this.WindowState = FormWindowState . Normal // set the window display state (maximize, minimize and normal mode) 7, form2.Owner = this // set form with this form, this form represents the main form affiliated with the main window body of the display and display form2.ShowInTaskbar = false form2.Show () 8, Form1 formmain = new Form1 () // form2 and show form1 form closed form formmain = (Form1) this.Owner // The global variable this.Owner cast to type FormMain