PC Review


Reply
Thread Tools Rate Thread

backgroundimage problem with flickering

 
 
jediknight
Guest
Posts: n/a
 
      20th Jun 2006
Hi All,

I am trying to use the example in codeproject
(http://www.codeproject.com/cs/media/...reeDrawing.asp) called
Flicker free drawing using GDI+ and C# which all well and good but I am
trying to also draw a background image.

I have a form on which I have placed a panel. I am drawing on this
panel little boxes as in the example but I also need to show a
background image for the panel.
If I put an image in the design view then it draws the image at the
start then I get a white background. I have tried putting the
backgroundimage of the panel in at different places for example in
OnPaint but it flickers quite badly.

Can anyone tell me what I can do please???

Thanks in advance..

 
Reply With Quote
 
 
 
 
Michael Powell
Guest
Posts: n/a
 
      22nd Jun 2006
Hi
try overriding OnPaintBackground and custom painting it there
also try leaving it in the OnPaint event, just double buffer your form as
follows:

public form1()
{
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
}


--
Mike Powell
Ramuseco Limited
www.ramuseco.com
"jediknight" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
>
> I am trying to use the example in codeproject
> (http://www.codeproject.com/cs/media/...reeDrawing.asp) called
> Flicker free drawing using GDI+ and C# which all well and good but I am
> trying to also draw a background image.
>
> I have a form on which I have placed a panel. I am drawing on this
> panel little boxes as in the example but I also need to show a
> background image for the panel.
> If I put an image in the design view then it draws the image at the
> start then I get a white background. I have tried putting the
> backgroundimage of the panel in at different places for example in
> OnPaint but it flickers quite badly.
>
> Can anyone tell me what I can do please???
>
> Thanks in advance..
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FLICKERING...(fore ground font color with flickering).. =?Utf-8?B?RWRkeSBTdGFu?= Microsoft Excel Misc 5 23rd Mar 2006 06:20 PM
Panel.BackgroundImage problem =?Utf-8?B?U2hhcm9u?= Microsoft C# .NET 12 28th Nov 2005 08:04 AM
Mdi Flickering problem Imran Microsoft Dot NET Framework Forms 1 31st Oct 2005 09:06 AM
Flickering problem Shoaib Windows XP Internet Explorer 2 8th Jan 2005 05:57 AM
Flickering problem in IE 6.0 Sudipta Ghosh Windows XP Internet Explorer 0 7th Feb 2004 09:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:59 AM.