Aaarrrggghhh -- that ugly flicker!

From: mr unreliable (ReplyToNewsgroup_at_notmail.com)
Date: 10/02/04


Date: Sat, 2 Oct 2004 15:01:02 -0400

hi gang,

I constructed a "fake" statusbar, using a picbox aligned to the bottom of my
form, and using api's to draw in the panels and text. This works well
enough.

Then I wanted to add some icons to the (fake) statusbar panels. I extracted
the icons from a system dll, and used an Image control(s) to display them.
I set the Image control's "parent" (i.e., container) to be the picbox, so
that the icons would "float" (appear on top) over the (fale) statusbar.
This works well enough, too.

The icons were 32x32, but the image in my (fake) statusbar has to be 16x16,
so I used the "stretch" (or in this case shrink) property of the Image
control to get the icons to fit into the statusbar panels. This works too.

Now the problem. The picbox has to be set to "AutoRedraw", in order to
"persist" the graphics that I am drawing with the api's. However, every
time the statusbar is updated, the icon in the Image control will "flicker".

I am not sure what is going on here, but I suspect that vb (the runtimes?)
is redrawing the icon in the Image control, and probably going to the
trouble of re-shrinking it in the process, for every time it redraws the
picbox. Or, perhaps vb is redrawing the picbox, and then redrawing the
Image control on top. Anyway...

Can anybody explain what is going on "under-the-covers"? And, hopefully,
can anybody suggest a way to avoid that ugly "flicker".

tiafah, jw

p.s. I am aware that Steve McMahon has done something like this on his
website, with his lite weight statusbar example. But Steve did it all with
api's, and I was hoping to use more of the capabilities of "standard" vb to
get the job done...



Relevant Pages

  • Aaarrrggghhh -- that ugly flicker!
    ... using a picbox aligned to the bottom of my ... Then I wanted to add some icons to the statusbar panels. ... the icon in the Image control will "flicker". ...
    (microsoft.public.vb.general.discussion)
  • Re: Aaarrrggghhh -- that ugly flicker!
    ... USE BUFFERED DRAW ... | I constructed a "fake" statusbar, using a picbox aligned to the bottom of my ... | the icons from a system dll, and used an Image controlto display them. ... | time the statusbar is updated, the icon in the Image control will "flicker". ...
    (microsoft.public.vb.general.discussion)
  • Re: Aaarrrggghhh -- that ugly flicker!
    ... USE BUFFERED DRAW ... | I constructed a "fake" statusbar, using a picbox aligned to the bottom of my ... | the icons from a system dll, and used an Image controlto display them. ... | time the statusbar is updated, the icon in the Image control will "flicker". ...
    (microsoft.public.vb.winapi)
  • Re: Set text color of a panel of a statusbar
    ... statusbar icons, you may wish to consider Steve McMahon's ... "vbAccelerator Status Bar Control". ... Steve's statusbar allows for icons in the statusbar panels, ...
    (microsoft.public.vb.winapi)
  • StatusBar Icons & Embedded Progress Bar
    ... a couple of icons that need to be changed at runtime; ... a progress bar in one of the panes. ... There are a lot of articles ... indicate how to embed a progress bar in a statusbar. ...
    (microsoft.public.dotnet.languages.vc)