PC Review


Reply
 
 
Joshua Moore
Guest
Posts: n/a
 
      22nd Feb 2004
I have two issues before we release. First, the big one. Double Buffering,
part of .NET Framework is not in .netCF. So I set up a panel with what
needs to be double buffered, then created another panel off screen, so it
would draw faster, then wanted to quote-unquote set them equal to each other
(or draw the panel off screen, then move it to correct location, without
flashing).

Second, I created a large bitmap for a background, but can't use it as
makeBackground (or whatever it's called) won't work.

I can live without a gradient background, but the double-buffering NEEDS to
happen. I would greatly appreciate anyone's help copying all the
data/graphics from one panel to another quickly to avoid the flashing.

In need,
Joshua Moore


 
Reply With Quote
 
 
 
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      22nd Feb 2004
Not sure what you're using a Panel for. Double-buffering entails simply
using an offscreen Bitmap to draw into, and after rendering everthing to
that Bitmap, blitting its contents to the on-screen area using a
Graphic.DrawImage call.

I suppose you could override the OnPaint of the off-screen panel, grab the
contents into a Bitmap and then in the OnPaint of the on-screen Panel, blit
it in - but I'm not sure how it will improve things.

A background bitmap can be done pretty easily by overriding the Form's
OnPaint and painting it in manually.

Gradient fill can be achieved using Alex's suggestions here:

http://blog.opennetcf.org/ayakhnin/P...4-a68bf83ab0cf

-Chris


"Joshua Moore" <(E-Mail Removed)> wrote in message
news:#Z#ctKO#(E-Mail Removed)...
> I have two issues before we release. First, the big one. Double

Buffering,
> part of .NET Framework is not in .netCF. So I set up a panel with what
> needs to be double buffered, then created another panel off screen, so it
> would draw faster, then wanted to quote-unquote set them equal to each

other
> (or draw the panel off screen, then move it to correct location, without
> flashing).
>
> Second, I created a large bitmap for a background, but can't use it as
> makeBackground (or whatever it's called) won't work.
>
> I can live without a gradient background, but the double-buffering NEEDS

to
> happen. I would greatly appreciate anyone's help copying all the
> data/graphics from one panel to another quickly to avoid the flashing.
>
> In need,
> Joshua Moore
>
>



 
Reply With Quote
 
Elisa
Guest
Posts: n/a
 
      22nd Feb 2004
Hi Joshua,

> I have two issues before we release. First, the big one. Double Buffering,
> part of .NET Framework is not in .netCF.


Mmm, double buffering is a technique where you perform all your drawing
techniques on an offscreen bitmap, then, when all the drawing operations
are done, copy the bitmap in its entirety to the screen. If I'm not
mistaken, the PictureButton example on the www.gotdotnet.com .NET CF
Quickstart section uses this technique, so have a look there.

Also, in order to prevent flickering, try overriding the
OnPaintBackground method with a completely empty method. Completely
empty means also NOT calling the OnPaintBackground method of the superclass.


Regards,

Elisa
 
Reply With Quote
 
Joshua Moore
Guest
Posts: n/a
 
      24th Feb 2004
What is the best way to take an image of the panel (and all the objects
inside)? I know I can use Graphics.DrawImage to "paste it".

Thanks,

"Elisa" <(E-Mail Removed)> wrote in message
news:fQYZb.272$(E-Mail Removed)...
> Hi Joshua,
>
> > I have two issues before we release. First, the big one. Double

Buffering,
> > part of .NET Framework is not in .netCF.

>
> Mmm, double buffering is a technique where you perform all your drawing
> techniques on an offscreen bitmap, then, when all the drawing operations
> are done, copy the bitmap in its entirety to the screen. If I'm not
> mistaken, the PictureButton example on the www.gotdotnet.com .NET CF
> Quickstart section uses this technique, so have a look there.
>
> Also, in order to prevent flickering, try overriding the
> OnPaintBackground method with a completely empty method. Completely
> empty means also NOT calling the OnPaintBackground method of the

superclass.
>
>
> Regards,
>
> Elisa



 
Reply With Quote
 
Boris Nienke
Guest
Posts: n/a
 
      24th Feb 2004
i'm not sure that you can draw all controls to a bitmap... it would be
interesting though

So, if you have a lot of controls that are flickering when being refreshed
then you might have a problem.

For a simple application i had just ONE Label that needs to be flickerfree.
I have decided to forget the Label and made it with a bitmap. I draw the
text to that bitmap (offscreen) and then paint the bitmap into a picturebox
(that simulates my label)

that works and of course if i need that more often i would make a little
control of it.
But when you need edit-controls, listboxes etc. then it would be a hard job
to do all the drawings by yourself

Boris

On Mon, 23 Feb 2004 21:14:11 -0700, Joshua Moore wrote:

> What is the best way to take an image of the panel (and all the objects
> inside)? I know I can use Graphics.DrawImage to "paste it".
>
> Thanks,
>
> "Elisa" <(E-Mail Removed)> wrote in message
> news:fQYZb.272$(E-Mail Removed)...
>> Hi Joshua,
>>
>>> I have two issues before we release. First, the big one. Double

> Buffering,
>>> part of .NET Framework is not in .netCF.

>>
>> Mmm, double buffering is a technique where you perform all your drawing
>> techniques on an offscreen bitmap, then, when all the drawing operations
>> are done, copy the bitmap in its entirety to the screen. If I'm not
>> mistaken, the PictureButton example on the www.gotdotnet.com .NET CF
>> Quickstart section uses this technique, so have a look there.
>>
>> Also, in order to prevent flickering, try overriding the
>> OnPaintBackground method with a completely empty method. Completely
>> empty means also NOT calling the OnPaintBackground method of the

> superclass.
>>
>>
>> Regards,
>>
>> Elisa

 
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
Great Place Store to Give your love.....love....iloveu.... hotbuysale@gmail.com Microsoft Frontpage 0 14th Feb 2008 01:48 AM
Lost in love - deciding on who to love - wanting Frank, however desiring Measekite ilovefrankhobbicolor@excite.com Printers 29 24th Jul 2007 03:07 PM
Extract portion of a bitmap to display, not entire bitmap. Alex Gray Microsoft C# .NET 2 22nd Feb 2004 01:42 PM
Question on how to access bitmap: Public Function getBitmap() As Bitmap Michael Murphy Microsoft VB .NET 2 7th Oct 2003 01:54 PM
extract OLE bitmap from table and save as a bitmap file Brett Rawcliffe Microsoft Access 1 19th Jul 2003 03:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:15 AM.