Large bmp refresh flicker

  • Thread starter Ian Cooper via .NET 247
  • Start date
I

Ian Cooper via .NET 247

I have inherited a UI application - not my forte to be honest - that uses a number of large bmp images for its main screen.

As the mouse travels over different parts of the screen certain areas are activated and to represent this the relevant bmp image is loaded using the DrawImage function on the Form.

The images are initially loaded but then kept in memory in a Hashtable after the first time they are needed and I am currently storing them in PARGB 32 bit format. The images are 640x480.

The problem that I have is when DrawImage is called I get flicker. There does not seem to be any use setting up double buffering as I am not drawing anything to the bmp, just calling DrawImage on a pre-stored image.

Does anyone have any ideas on how I can overcome the flicker?

Thanks.
 
M

Munir Husseini

Am Fri, 03 Jun 2005 03:47:18 -0700 schrieb Ian Cooper via .NET 247:
I have inherited a UI application - not my forte to be honest - that uses a number of large bmp images for its main screen.

As the mouse travels over different parts of the screen certain areas are activated and to represent this the relevant bmp image is loaded using the DrawImage function on the Form.

The images are initially loaded but then kept in memory in a Hashtable after the first time they are needed and I am currently storing them in PARGB 32 bit format. The images are 640x480.

The problem that I have is when DrawImage is called I get flicker. There does not seem to be any use setting up double buffering as I am not drawing anything to the bmp, just calling DrawImage on a pre-stored image.

Does anyone have any ideas on how I can overcome the flicker?

Thanks.

Hi Ian,

double buffering affects the "Image" of the control, not the bitmaps you
want to paint so I'd guess that it helps.

Also try to disable the OnPaintBackgroung method (by overriding it and
doing nothing).

Regards,
Munir Husseini
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top