` Printed Icetips Article

Icetips Article



ABC: Fix flicker on windows
2007-02-06 -- Arnor Baldvinsson
 
For some time I have been experiencing some annoying flicker in my 6.3 (9053) apps. Since I'm using XP-Themes, resizable windows, browse header sort, wallpapers, themed tabsheets and what not, I contributed it to these additions. This morning I got really annoyed so I started digging. And what I found was kind of amazing.

The problem is that the window resize code is generated _after_ the browse is initialized. This causes the browse to re-load and _that_ causes the flicker.

So to experiment with it, I did some omits and stuff and basically moved all the resize code before the browse init code. NO FLICKER!:):):) Even with XP-Theme, resize, header sorts, what not, no flicker at all. The window just pops up with everything in place!

Now it makes perfect sense to me to set up the window and browse sizes before you load the browses. My guess is that during the years the resize just got kind of stuck in there and things got moved around in the templates and in classes so the sight of the proper chain of execution got lost somewhere along the way. The fix is extremely simple and as far as I can tell, there are no bad side effects:)

If you make those changes, please:

***___make a backup copy of ABWINDOW.TPW before you begin___***

There are tree minor changes needed to ABWINDOW.TPW:

Line 379:

#PRIORITY(8250),DESCRIPTION('Restore from INI file')

Changed priority from 8250 to 8115

Line 1473:

#AT(%WindowManagerMethodCodeSection,'Init','(),BYTE'),PRIORITY(8125),DESCRIPTION('Initialize
resizer')

Changed priority from 8125 to 8110

Line 1481:

#AT(%WindowManagerMethodCodeSection,'Init','(),BYTE'),PRIORITY(8375),WHERE(%AppStrategy
NOT='Don''t alter controls' AND %INISaveWindow AND
~%DisableINISaveWindow),DESCRIPTION('Resize window to INI saved size')

Changed priority from 8375 to 8120.

That's it. All my resizable windows now load with no or very little flicker (some have multiple browses, PowerToolbars, all kinds of stuff so I would expect some flicker on some of them) and life is good:)




Printed April 27, 2024, 1:32 pm
This article has been viewed/printed 35116 times.
Google search has resulted in 11 hits on this article since January 25, 2004.