We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to minimize and maximize windows form with system tray (notifyIcon control).

I'm having a problem with the notifyIcon control, which hasn't been able to minimize and maximize my application when double clicked. You could please review the code I'm using below... private void notifyIcon1_DoubleClick(object sender, System.EventArgs e) { if ((this.WindowState == FormWindowState.Minimized)||(this.WindowState == FormWindowState.Normal)) this.WindowState = FormWindowState.Minimized; // Activate the form. this.Activate(); }

Loader.
Live Chat Icon For mobile
Up arrow icon