Home > Net >  Winform window when from minimize to maximize window background or background color rendering is not
Winform window when from minimize to maximize window background or background color rendering is not

Time:01-05

Novice c # desktop client to develop a

Lock screen with winform made a simulation program, the startup is a completely mask the table full screen window, the window there is a password input box, after the input the correct password, I will try to minimize this window, then the user can normal operation desktop, after a period of time, I'll to maximize window desktop mask (simulated the effect of the lock screen), the above under Windows 7 can be normal operation in line with expectations, but when to maximize the window under the win10 window set by the background (or background) there will be no renders a large, whatever I set into a pure background or pure color no,

Everybody help see where is wrong?

 
Enclosing BackColor=System. Drawing. Color. FromArgb (((int) (((byte) (0)))), ((int) (((byte) (153)))), ((int) (((byte) (204)))));
Enclosing the BackgroundImage=global: : ScreenManage Properties. Resources. _LockBgImage;
Enclosing BackgroundImageLayout=System. Windows. Forms. ImageLayout. Stretch;
Enclosing ClientSize=new System. Drawing. The Size (924, 788);
Enclosing FormBorderStyle=System. Windows. Forms. FormBorderStyle. None;
Enclosing MaximizeBox=false;
Enclosing MinimizeBox=false;
Enclosing MinimumSize=new System. Drawing. The Size (1, 1);
Enclosing ShowIcon=false;
Enclosing ShowInTaskbar=false;
Enclosing StartPosition=System. Windows. Forms. FormStartPosition. CenterScreen;
This. TopMost=true;
Enclosing WindowState=System. Windows. Forms. FormWindowState. Maximized;

CodePudding user response:

Try to update the graphics drivers, generally showed abnormal under different operating system environments, mostly related to graphics drivers,

CodePudding user response:

You try, don't write to minimize, maximize,
Change the code to display, hide,
This. Hide ();
This. The Show ();
  •  Tags:  
  • C#
  • Related