Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Thu, 03 Jul 2008 17:13:27 +0200,    group: microsoft.public.dotnet.framework.windowsforms        back       


DoubleBuffered not working in panel?   
For a kiosk-type application I have a form with some labels placed directly
onto it, and an empty panel that covers part of the form.

During program execution, labels are added to and removed from that panel
to display different information.

The form has a background image.

Its DoubleBuffered property = True to avoid flickering during updates, but
double buffering seems to be used only for controls placed directly on the
form, not for those within the panel.  Updating the panel without visible
flicker seems to be impossible.


Each "flicker" consists of the background image within the panel's
boundaries first disappearing (replaced by the form background color), and
reappearing immediately thereafter.

When the background image reappears, that doesn't happen in a single
stroke: it becomes visible first for about half of the area.  The rest
follows at the next display refresh (I mean monitor vertical sync).


If you ask me, this (disappearing / reappearing in more than one display
refresh) means it is either not being double-buffered, or the working
buffer is copied into the screen buffer to soon, while it is still being
repainted.



The platform is XP Professional (application being developed for later use
on XP Embedded).

The flicker does NOT seem to occur on my development machine, which is
running Vista, but this machine is also equipped with a more performant
processor and display adapter, which may explain the difference too.
date: Thu, 03 Jul 2008 17:13:27 +0200   author:   Luc am

RE: DoubleBuffered not working in panel?   
Hi Luc,

I suggest that you enable double buffering on the Panel itself. Do do this, 
derive from the Panel class and set the DoubleBuffered property to true in 
the derived class's constructor.

For example:

class MyPanel:Panel
{
    public MyPanel()
    {
         this.DoubleBuffered = true;
    }
}

Then use the derived Panel control on your form. Please try my suggestion 
to see if it can solve your problem.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and 
suggestions about how we can improve the support we provide to you. Please 
feel free to let my manager know what you think of the level of service 
provided. You can send feedback directly to my manager at: 
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues 
where an initial response from the community or a Microsoft Support 
Engineer within 1 business day is acceptable. Please note that each follow 
up response may take approximately 2 business days as the support 
professional working with you may need further investigation to reach the 
most efficient resolution. The offering is not appropriate for situations 
that require urgent, real-time or phone-based interactions or complex 
project analysis and dump analysis issues. Issues of this nature are best 
handled working with a dedicated Microsoft Support Engineer by contacting 
Microsoft Customer Support Services (CSS) at 
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
date: Fri, 04 Jul 2008 07:56:56 GMT   author:   (Linda Liu[MSFT])

Re: DoubleBuffered not working in panel?   
On Fri, 04 Jul 2008 07:56:56 GMT, v-lliu@online.microsoft.com (Linda
Liu[MSFT]) wrote:

> Hi Luc,
> 
> I suggest that you enable double buffering on the Panel itself. Do do this, 
> derive from the Panel class and set the DoubleBuffered property to true in 
> the derived class's constructor.

Thanks a lot, that did the trick.
date: Fri, 04 Jul 2008 13:36:47 +0200   author:   Luc am

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us