473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Double buffering a groupbox

My dialog has groupboxes with slow to redraw controls, to improve the
appearance I want to doublebuffer it. While I can use SetStyle() in the
Dailogs constructor the setting change doesn't get propagated to the
groupbox, and since it's a protected method I can't call groupbox.SetStyle().
I've tried deriving a custom class from System.Windows.Forms.GroupBox and
calling SetStyle from inside of it's constructor and from a new method. Both
were unsuccessful.

I can approximate a groupboxes appearance and get double buffering by
replacing it with a panel and placing a label on it's border but none of the
allowed borders for a panel are the same as the one used by a gb.

Is there any way to either force the GB to doublebuffer itself and contained
controls, or change the appearance of the panels border to more closely match
that of a GB?
Nov 17 '05 #1
2 5579
Double buffering applies only to the surface of the control itself. Not the
child controls within it.

These child controls all have their own windows and handle their drawing
individually so setting the double buffering in a parent will have no
effect.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Dan Neely" <Da******@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com...
My dialog has groupboxes with slow to redraw controls, to improve the
appearance I want to doublebuffer it. While I can use SetStyle() in the
Dailogs constructor the setting change doesn't get propagated to the
groupbox, and since it's a protected method I can't call
groupbox.SetStyle().
I've tried deriving a custom class from System.Windows.Forms.GroupBox and
calling SetStyle from inside of it's constructor and from a new method.
Both
were unsuccessful.

I can approximate a groupboxes appearance and get double buffering by
replacing it with a panel and placing a label on it's border but none of
the
allowed borders for a panel are the same as the one used by a gb.

Is there any way to either force the GB to doublebuffer itself and
contained
controls, or change the appearance of the panels border to more closely
match
that of a GB?

Nov 17 '05 #2


"Bob Powell [MVP]" wrote:
Double buffering applies only to the surface of the control itself. Not the
child controls within it.

These child controls all have their own windows and handle their drawing
individually so setting the double buffering in a parent will have no
effect.


Hmmm. How can I stop the flicker whenever I resize my form. Putting my
controls in a groupbox makes the problem worse than leaving them on the main
form or sticking them in a panel instead. I've also managed to improve
performance a bit by setting Bounds instead of making seperate Size and
Location changes. Is there a way to stop redraws until my Resize event
completes it's work.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David | last post by:
Hello I'm writting an apllication and i like to display and offscreen image. However my code doesn't seem to work. It compiles and runs properly but What i want is to associate the button of the...
3
by: Alex Glass | last post by:
I have read plenty about applying double buffering for animation and self drawn forms. Is there a way to apply it to a form with many standard controls on it (textboxes, labels etc) ?? I have...
2
by: MPowell | last post by:
Gents/Ladies, I'm doing (at least plan on ) lots of Reads and Writes across a communication channel. I'm told that for the 'receive side' it'd be prudent to implement a double buffering scheme to...
2
by: Jason | last post by:
I have created a 2d isometric game map using tiles and now I'm trying to move around my map..when i go near the edge of the map I want to redraw the map to show new parts of the map however the...
1
by: Kuba Florczyk | last post by:
Hi I've got some problem doing double buffer. Here is my problem: I've got custom control on which i paint some data (chat messages, lets call it ChatControl), this control is puted on a...
0
by: David Veeneman | last post by:
This post is for the Google archive and does not require a reply. I received an 'Invalid parameter used' error when trying to do double-buffering with the .Net SetStyles method. I used this code...
7
by: Rain | last post by:
Hello Gurus! I really need this one to finish a module in my thesis. PLease please help me. I need a double buffer class so i can call it and use it anytime i want, the problem is everything ive...
1
by: TyBreaker | last post by:
I notice in VB 2005 that I can set a form to be double-buffered just by setting that option to true in the Form properties. I have a panel on that form but there doesn't appear to be a...
3
by: ssoffline | last post by:
hi i have an app in which i can drop objects onto a form and move them, it consists of graphics (lines), i am using double buffering to avoid filckering in the parent control which is a panel,but...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.