﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » .NET Forums » General .NET Discussion  » Remedy for Form Flicker</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 18 May 2026 14:36:20 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Remedy for Form Flicker</title><link>http://forum.strataframe.net/FindPost12437.aspx</link><description>We actually added this API call to the SF tools namespace.&amp;nbsp; It will be included in the 1.6.2 build or you could just manually call the API.&lt;P&gt;&lt;STRONG&gt;Using SF&lt;BR&gt;&lt;/STRONG&gt;[codesnippet]MicroFour.StrataFrame.Tools.LockScreen.Lock(Me)&lt;BR&gt;MicroFour.StrataFrame.Tools.LockScreen.Unlock()[/codesnippet]&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Using WinAPI Directly&lt;/STRONG&gt; (All the SF method does)&lt;BR&gt;[codesnippet]&amp;lt;DllImport("user32.dll")&amp;gt; _&lt;BR&gt;Private Shared Function LockWindowUpdate(ByVal hWndLock As IntPtr) As Boolean&lt;BR&gt;End Function&lt;/P&gt;&lt;P&gt;'-- Lock the window&lt;BR&gt;LockWindowUpdate(Me.Handle)&lt;/P&gt;&lt;P&gt;'-- Unlock the Window&lt;BR&gt;LockWindowUpdate(Intptr.Zero)[/codesnippet]&lt;BR&gt;</description><pubDate>Mon, 05 Nov 2007 10:41:14 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Remedy for Form Flicker</title><link>http://forum.strataframe.net/FindPost4832.aspx</link><description>&lt;br&gt;
&lt;br&gt;
I have spent quit a bit of time searching for a remedy for our form flickering issue.  On some of our busy forms (80-100 controls) when the form is drawing you can see the individual controls being drawn, which causes the form to flicker.  What I want to happen is basically draw the form invisibly, then once all the forms are drawn show the entire form.  I have attempted the doublebuffer solution but it has not helped the situation.&lt;br&gt;
&lt;br&gt;
Has anyone else experienced this 'flicker'?  If so how did you remedy it?</description><pubDate>Mon, 05 Nov 2007 10:41:14 GMT</pubDate><dc:creator>Brad Vick</dc:creator></item><item><title>RE: Remedy for Form Flicker</title><link>http://forum.strataframe.net/FindPost12358.aspx</link><description>Unfortunately it is not just when a form loads. After my form is loaded, clicking on any tab, then back repeatedly, shows the ghost image of the tab clicked from while drawing the control on the page tab clicked to. If it was just on the page load it wouldn't be as bad. My thought would be a lock to the windows 32 desktop on the activation of the page tab and then unlocking after the tab is rendered. Is there any example of the win32 api code required to handle this and what event it should be located in?</description><pubDate>Thu, 01 Nov 2007 18:00:36 GMT</pubDate><dc:creator>Ross L Rooker, Sr.</dc:creator></item><item><title>RE: Remedy for Form Flicker</title><link>http://forum.strataframe.net/FindPost12357.aspx</link><description>Hi Guys,&lt;P&gt;Since I’m new to .Net and strataframe I tend to read as many post to see what issues people are having and how they are handled. This one caught my attention in its absurdity :crazy: that like Ben points out should not exists and after searching for this issue it seems to be a grieving complaint :angry: among .net developers.&lt;/P&gt;&lt;P&gt;In any case its resolution is a little above my head :hehe: but besides the solutions before mentioned I found these 2 post that might help others.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Frozen forms for flickering-free updates&lt;BR&gt;&lt;/STRONG&gt;&lt;A href="http://www.dotnet2themax.com/blogs/fbalena/PermaLink,guid,6336502b-57c5-430d-9d37-7f9be484f6b3.aspx"&gt;http://www.dotnet2themax.com/blogs/fbalena/PermaLink,guid,6336502b-57c5-430d-9d37-7f9be484f6b3.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Practical Tips for Boosting the Performance of Windows Forms Apps&lt;BR&gt;&lt;/STRONG&gt;&lt;A href="http://msdn.microsoft.com/msdnmag/issues/06/03/WindowsFormsPerformance/"&gt;http://msdn.microsoft.com/msdnmag/issues/06/03/WindowsFormsPerformance/&lt;/A&gt;</description><pubDate>Thu, 01 Nov 2007 15:54:39 GMT</pubDate><dc:creator>Jc Martinez</dc:creator></item><item><title>RE: Remedy for Form Flicker</title><link>http://forum.strataframe.net/FindPost12339.aspx</link><description>You'd think for a $1 billion project like .NET 2.0 with 700 programmers, they'd come up with a way to prevent the flicker when forms load... oh well.</description><pubDate>Thu, 01 Nov 2007 09:13:22 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Remedy for Form Flicker</title><link>http://forum.strataframe.net/FindPost12338.aspx</link><description>With the way that .NET uses controls that are individually windowed (each control is considered to be its own window wth its own hWnd), the drawing issues at form startup are hard to avoid.&amp;nbsp; There are some workarounds, but nothing that is simple:&lt;/P&gt;&lt;P&gt;1)&amp;nbsp; Show the form somewhere off screen (like (10000, 10000) and once the SetVisibleCore has existed (or once the Shown event fires), the move its location back to the screen&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; For panels, show the panel off screen, once it's done rendering, use the Control.DrawToBitmap() method to take a snapshot of the panel, show a picture box in place of the panel with the picture, relocate the panel to slide it underneath the picture, and lastly, hide the picture.&lt;/P&gt;&lt;P&gt;There are other ways, but thinks like WM_SETREDRAW and LockWindow only work for one window handle at a time, and only affect the form, not all controls on the form.&lt;/P&gt;&lt;P&gt;The second option is what we ended up having to do for PracticeStudio.NET because the way our interface works, it doesn't have forms, just pages that open up as tabs.</description><pubDate>Thu, 01 Nov 2007 09:12:25 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Remedy for Form Flicker</title><link>http://forum.strataframe.net/FindPost12328.aspx</link><description>Good to see back on the forum, ben!</description><pubDate>Wed, 31 Oct 2007 21:16:21 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Remedy for Form Flicker</title><link>http://forum.strataframe.net/FindPost12324.aspx</link><description>[quote]What I want to happen is basically draw the form invisibly, then once all the forms are drawn show the entire form. [/quote]&lt;br&gt;
You may want to set the Opacity=0 or .25 first and then when all controls are drawn, you can set to 1 through a loop to give it a nice effect.</description><pubDate>Wed, 31 Oct 2007 17:24:03 GMT</pubDate><dc:creator>Ben Hayat</dc:creator></item><item><title>RE: Remedy for Form Flicker</title><link>http://forum.strataframe.net/FindPost12313.aspx</link><description>Is the flicker issue resolved in the framework when using tabbed forms?</description><pubDate>Wed, 31 Oct 2007 13:56:59 GMT</pubDate><dc:creator>Ross L Rooker, Sr.</dc:creator></item><item><title>RE: Remedy for Form Flicker</title><link>http://forum.strataframe.net/FindPost4836.aspx</link><description>&lt;br&gt;
&lt;br&gt;
We try not to use tabs, instead we are using the panel manager and breaking the controls down inside individual panels.&lt;br&gt;
&lt;br&gt;
Any ideas?</description><pubDate>Tue, 28 Nov 2006 14:56:15 GMT</pubDate><dc:creator>Brad Vick</dc:creator></item><item><title>RE: Remedy for Form Flicker</title><link>http://forum.strataframe.net/FindPost4835.aspx</link><description>Yes, we have experienced it... and the only solution we have found was to places sets of controls on separate tabs on the page.&amp;nbsp; The DoubleBuffer property on the form didn't do anything for us, either, and there is no way to completely lock a form and prevent drawing or to force the form to only draw one time.&amp;nbsp; Anyone else have a suggestion?</description><pubDate>Tue, 28 Nov 2006 14:36:31 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>