CodePudding user response:
Can adjust back, minimize the clocks back again afterthis. FormBorderStyle=FormBorderStyle. Sizable;
Enclosing WindowState=FormWindowState. Minimized;
Enclosing FormBorderStyle=FormBorderStyle. None;
Animation, but this will affect the interface can be defined a Boolean as a lock to control,
The AnimateWindow function before and after adding:
animLock=true;
AnimateWindow (this Handle, 400, AW_ACTIVE | AW_VER_POSITIVE);
AnimLock=false;
Then before the code can be changed to:
if (animLock)
{
return;
}
Enclosing FormBorderStyle=FormBorderStyle. Sizable;
Enclosing WindowState=FormWindowState. Minimized;
Enclosing FormBorderStyle=FormBorderStyle. None;
CodePudding user response:
Oh, and minimize from the task bar to activate the animation after solution:Monitor window Activated event, the code is as follows:
private void MainForm_Activated (object sender, EventArgs e)
{
Console. WriteLine (" MainForm_Activated ");
If (animLock)
{
return;
}
Enclosing FormBorderStyle=FormBorderStyle. Sizable;
Enclosing WindowState=FormWindowState. Normal;
Enclosing FormBorderStyle=FormBorderStyle. None;
}
The above methods will flash because to layout, animation is, flash, blink, also don't know how to solve