Re: Aaarrrggghhh -- that ugly flicker!
From: [SolarAngel] (not-for-mail)
Date: 10/05/04
- Next message: Ken Halter: "Re: Binary Registry Writes"
- Previous message: Ken Halter: "Re: Registering MScomm32.ocx"
- In reply to: mr unreliable: "Aaarrrggghhh -- that ugly flicker!"
- Next in thread: Michael Culley: "Re: Aaarrrggghhh -- that ugly flicker!"
- Reply: Michael Culley: "Re: Aaarrrggghhh -- that ugly flicker!"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 5 Oct 2004 23:28:56 +0200
USE BUFFERED DRAW
draw to memory than when drawing is done draw back to hDC,
also try not to make memory leaks (resources, handles), destroy all handles when you done.
I had similar problems with drawing, search interenet and MSDN for Flicker Free example how to do it.
[SolarAngel]
"mr unreliable" <ReplyToNewsgroup@notmail.com> wrote in message news:#P7nrCLqEHA.2724@TK2MSFTNGP14.phx.gbl...
| 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...
|
|
- Next message: Ken Halter: "Re: Binary Registry Writes"
- Previous message: Ken Halter: "Re: Registering MScomm32.ocx"
- In reply to: mr unreliable: "Aaarrrggghhh -- that ugly flicker!"
- Next in thread: Michael Culley: "Re: Aaarrrggghhh -- that ugly flicker!"
- Reply: Michael Culley: "Re: Aaarrrggghhh -- that ugly flicker!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|