Screen flicker when restoring minimized form

Author Message
 Posted 9/12/2016 12:52:40 PM
Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: Awaiting Activation
Last Login: 3/2/2020 12:19:05 PM
Posts: 595, Visits: 3,807
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?

Tags:
Post #33385
Add to Twitter Add to Facebook
 Posted 9/13/2016 7:36:59 AM
Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: Awaiting Activation
Last Login: 3/2/2020 12:19:05 PM
Posts: 595, Visits: 3,807
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.
Post #33386
Add to Twitter Add to Facebook
 Posted 9/13/2016 8:04:33 AM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: 4/9/2021 12:42:36 PM
Posts: 2,436, Visits: 24,184
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
(Using VB.Net 2019/SQL Server 2017)
Post #33387
Add to Twitter Add to Facebook
 Posted 9/13/2016 11:08:36 AM
Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: Awaiting Activation
Last Login: 3/2/2020 12:19:05 PM
Posts: 595, Visits: 3,807
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
Post #33388
Add to Twitter Add to Facebook


Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.