Home > Net >  Right click on the status bar "show desktop", not trigger forms Sizechange and Resize even
Right click on the status bar "show desktop", not trigger forms Sizechange and Resize even

Time:11-14

My goal: when the window is displayed, not in the status bar displays ICONS on the right side; When form to minimize display icon, then click the icon to display form, icon disappeared,
To minimize the form can be used normally, but if the right click on the status bar shows the desktop directly, not triggered Sizechange, resulting form disappeared, don't display icon,
 
Private void notifyIcon1_MouseClick (object sender, MouseEventArgs e)
{
Enclosing the Visible=true;
Enclosing WindowState=FormWindowState. Normal;
This. NotifyIcon1. Visible=false;
}

Private void Form1_SizeChanged (object sender, EventArgs e)
{
If (this. WindowState==FormWindowState. Minimized)
{
This. Hide ();
This. NotifyIcon1. Visible=true;
}
}

Can you tell me how to solve?

CodePudding user response:

Is not does not display, need to refresh my tray,

Windows the tray do not deal with, the default or some small problems, don't you find some produce multiple the tray icon will generate instant, and then painted a yao

CodePudding user response:

Another tray icon is more, he will hide yourself, require you to manually drag out, on the display area

CodePudding user response:

Oh, that how to refresh?
  •  Tags:  
  • C#
  • Related