Screen flicker when restoring minimized form


Author
Message
Larry Caylor
Larry Caylor
Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
By using multiple programming tricks I've found on the internet, I've managed to get the more complex forms in my application to display crisply without any screen flicker. However I haven't been able to resolve an issue when restoring a minimized window. If I restore the window by clicking on the minimized item in the Windows task bar, it restores smoothly without any visible screen painting. However if I restore the same form in code by setting WindowState = FormWindowState.Normal I get some annoying rendering action. Parts of the form go black while it is being restored. Windows obviously knows something about restoring a minimized window that I don't. Is there another/better way besides setting WindowState?
Larry Caylor
Larry Caylor
Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
I got the restore to work better by setting the WindowState in a different place in my code. There were likely some events firing that were taking some cpu cycles away from the restore. However I did notice that it works much better on Windows 7 than Windows 8.1. Windows 7 uses an animation when restoring that seems to hide any screen repainting. Windows 8.1 doesn't use the animation and some of the screen re-painting is visible.
Edhy Rijo
E
StrataFrame VIP (2.7K reputation)StrataFrame VIP (2.7K reputation)StrataFrame VIP (2.7K reputation)StrataFrame VIP (2.7K reputation)StrataFrame VIP (2.7K reputation)StrataFrame VIP (2.7K reputation)StrataFrame VIP (2.7K reputation)StrataFrame VIP (2.7K reputation)StrataFrame VIP (2.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Larry,

Thanks for sharing this information.

What .net runtime are you using?  I am using 4.6 but keep in mind that this kind of issue will depend on the controls you have in your forms, in my case, all my forms have a SF Panel Manager and at least one PanelManagerPage.

Here is a quick video (mute) of my application just minimizing 2 forms, so you can see how is working on my end.
http://screencast.com/t/4uIzIObenguI

Edhy Rijo

Larry Caylor
Larry Caylor
Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
I Edhy,

Thank for the example. I'm using Infragistics controls and my more complicated forms make heavy use of the SF Panel Manager and Infragistics tab controls. I've also sub classed my Infragistics control so they follow the StrataFrame themes. As I said in my last post, I've now got it working very well in Windows 7 and It's acceptable in Win 8.1 although there is a flash of black while the form repaints. I don't know why Microsoft eliminated the animation between Win 7 and Win 8.1 when restoring a window, Win 7 is much better. In the end most of my issue was caused by where I placed the restore. Rearranging the code pretty much fixed it.

-Larry
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search