473,772 Members | 3,672 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

double buffering in child controls

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 when i add
controls to this panel dyanamically, the double buffering effect is not
there, i move all lines connceted to a control when the control is
moved , at this time flickering occurs,also when i enable double
buffering for a child control an exception is thrown when i drop
control onto the panel
sayiong "Parameter is not valid." , at this line of code
Application.Run (new MainForm());
please help.

Sameer Sood
Microsoft Student partner
NIT Durgapur,india

Oct 21 '06 #1
3 5949
"ssoffline" <ss*******@gmai l.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
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 when i add
controls to this panel dyanamically, the double buffering effect is not
there, i move all lines connceted to a control when the control is
moved , at this time flickering occurs,also when i enable double
buffering for a child control an exception is thrown when i drop
control onto the panel
Double buffering does not carry through to child controls. You need to set
it for each control.
sayiong "Parameter is not valid." , at this line of code
Application.Run (new MainForm());
please help.
This usually happens when an exception is thrown in the paint event, you
need to track down that exception.
Michael
Oct 21 '06 #2
the exception is thrown as i have updated styles from within the user
control in addition to the form, the problem is solved when i remove it
from child controls, but if form has all flags enabled then why the
flickering is there, and is there any way to enable double buffering on
user controls?

Michael C wrote:
"ssoffline" <ss*******@gmai l.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
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 when i add
controls to this panel dyanamically, the double buffering effect is not
there, i move all lines connceted to a control when the control is
moved , at this time flickering occurs,also when i enable double
buffering for a child control an exception is thrown when i drop
control onto the panel

Double buffering does not carry through to child controls. You need to set
it for each control.
sayiong "Parameter is not valid." , at this line of code
Application.Run (new MainForm());
please help.

This usually happens when an exception is thrown in the paint event, you
need to track down that exception.
Michael
Oct 22 '06 #3
"ssoffline" <ss*******@gmai l.comwrote in message
news:11******** *************@i 3g2000cwc.googl egroups.com...
the exception is thrown as i have updated styles from within the user
control in addition to the form, the problem is solved when i remove it
from child controls, but if form has all flags enabled then why the
flickering is there,
As I said, double buffering doesn't apply to child controls, you need to
enable it individually. I'm not sure why you're getting an error though.

Michael
Oct 23 '06 #4

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

Similar topics

3
2985
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 tried using myForm.SetStyles(ControlStyles.DoubleBuffer, True) however it has made no impact on the drawing operation. Any clarification would be greatly appreciated -Alex
6
4252
by: Dave Veeneman | last post by:
I'm drawing a graphic directly to a form, using a Paint event handler. All works well, except that the graphic flickers when I resize the form. So, I implement double-buffering for the form using the following function: public void EnableDoubleBuffering() { this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); this.UpdateStyles();
2
3462
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 screen flicker a good bit while this happens. I'm using GDI+ and it say in MSDN that double buffering will fix this but it didnt work for me. this.Setstyle(Controlstyles.DoubleBuffer, true ); this.Setstyle(Controlstyles.UserPaint, true );...
2
5611
by: Dan Neely | last post by:
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...
20
5114
by: Charles Law | last post by:
This is actually a follow on from yesterday's post about masking mouse clicks in a user control. The solution I have implemented - from Herfried - places a transparent window over the entire user control, which then uses the various mouse events to allow the user to drag the control without any clicks going through to the buttons and dropdowns on the control below. All well and good. However, I am getting an unsightly flicker when I...
7
6515
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 tried as a class doesnt work.. please please help. I only need the double buffering of controls, graphics... as a class. Can anyone help me with this? Thank You so so much in advacne. I would really appreciate any help.
1
2128
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 in C# so i can call it and use it anytime i want, the problem is everything ive tried as a class doesnt work.. please please help. I only need the double buffering of controls, graphics... as a class. Can anyone help me with this? Thank You so so much in advacne. I would really appreciate any help.
1
1831
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 double-buffered property for the panel control. My first question: is the double buffering set on the form inherited by the panel control or do I have to do the old fashioned manual double-buffering with the panel? I've noticed that animation I render...
1
1665
by: Rune Jacobsen | last post by:
Hi, I have a question about double buffering, or more specifically, when to apply it. As mentioned in another post, I have a control that basically contains three other controls. This parent control has no real painting of it's own. The main child is a data area, and the two other children are on top of and to the left of the data area, respectively, making a kind of grid view. So when the data area scrolls, the other two are set to...
0
9620
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10104
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.