double buffering in child controls

S

ssoffline

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
 
M

Michael C

ssoffline said:
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
 
S

ssoffline

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?
 
M

Michael C

ssoffline said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top