DoubleBuffer in Window Form Controls...
-
I have create a custom Windows form control and enabled the built in double buffering with:
this.SetStyle(ControlStyles.DoubleBuffer & ControlStyles.UserPaint & ControlStyles.AllPaintingInWmPaint, true);
but this does not help my flicker problem at all... From what I have read that will work in controls, Right?.?. Joshua Guy
Sonork ID: 100.9944 ICQ: 519642 Hotmail: JoshuaJGuy@hotmail.com
-
I have create a custom Windows form control and enabled the built in double buffering with:
this.SetStyle(ControlStyles.DoubleBuffer & ControlStyles.UserPaint & ControlStyles.AllPaintingInWmPaint, true);
but this does not help my flicker problem at all... From what I have read that will work in controls, Right?.?. Joshua Guy
Sonork ID: 100.9944 ICQ: 519642 Hotmail: JoshuaJGuy@hotmail.com
this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
-
this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
DOH! Well that was part of my problems, but even with that it still flickers like crazy. I have that enabled in my Windows Form control and the parent form. Any other suggestions? Joshua Guy
Sonork ID: 100.9944 ICQ: 519642 Hotmail: JoshuaJGuy@hotmail.com
-
I have create a custom Windows form control and enabled the built in double buffering with:
this.SetStyle(ControlStyles.DoubleBuffer & ControlStyles.UserPaint & ControlStyles.AllPaintingInWmPaint, true);
but this does not help my flicker problem at all... From what I have read that will work in controls, Right?.?. Joshua Guy
Sonork ID: 100.9944 ICQ: 519642 Hotmail: JoshuaJGuy@hotmail.com
Are you doing all your drawing during the Paint event? Thats the only time that the double-buffering is actually used. James Simplicity Rules!
-
Are you doing all your drawing during the Paint event? Thats the only time that the double-buffering is actually used. James Simplicity Rules!
It's all in the Paint event. To make things worse. I copied and pasted all my code into a form and it works like a charm. I'll dig in more into the control but something isn't right with that. Joshua Guy
Sonork ID: 100.9944 ICQ: 519642 Hotmail: JoshuaJGuy@hotmail.com
-
Are you doing all your drawing during the Paint event? Thats the only time that the double-buffering is actually used. James Simplicity Rules!
DOH! It was so stupid I won't even admit what I did. Joshua Guy
Sonork ID: 100.9944 ICQ: 519642 Hotmail: JoshuaJGuy@hotmail.com
-
DOH! It was so stupid I won't even admit what I did. Joshua Guy
Sonork ID: 100.9944 ICQ: 519642 Hotmail: JoshuaJGuy@hotmail.com
:-D But you must tell us, if not for us do it for the children; think of the children who may fall into the same trap you did. ;P James Simplicity Rules!
-
:-D But you must tell us, if not for us do it for the children; think of the children who may fall into the same trap you did. ;P James Simplicity Rules!
If you must know. I posted the message with the following code: this.SetStyle(ControlStyles.DoubleBuffer & ControlStyles.UserPaint & ControlStyles.AllPaintingInWmPaint, true); Which of course would not enable the double buffering. Neil points out my stupid mistake(which I originally had in my other test form, but a monkey came along and changed all the |'s to &'s as a nasty joke, so as you see this was clearly the monkeys fault not mine) this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); So I see Neil'd observation and hit myself. Well evidently I hit my self so hard that when I went to change it I went into the source of my dummy app in which I was testing the control. So the parent form was double buffered correctly. Thinking that I had enabled it in my control I was sad. So I left it alone until now. And after a break and looking in my code again I relize that the monkeys &'s had not be changed to |'s... If it weren't for the monkey I would have been set. Joshua Guy
Sonork ID: 100.9944 ICQ: 519642 Hotmail: JoshuaJGuy@hotmail.com
-
If you must know. I posted the message with the following code: this.SetStyle(ControlStyles.DoubleBuffer & ControlStyles.UserPaint & ControlStyles.AllPaintingInWmPaint, true); Which of course would not enable the double buffering. Neil points out my stupid mistake(which I originally had in my other test form, but a monkey came along and changed all the |'s to &'s as a nasty joke, so as you see this was clearly the monkeys fault not mine) this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); So I see Neil'd observation and hit myself. Well evidently I hit my self so hard that when I went to change it I went into the source of my dummy app in which I was testing the control. So the parent form was double buffered correctly. Thinking that I had enabled it in my control I was sad. So I left it alone until now. And after a break and looking in my code again I relize that the monkeys &'s had not be changed to |'s... If it weren't for the monkey I would have been set. Joshua Guy
Sonork ID: 100.9944 ICQ: 519642 Hotmail: JoshuaJGuy@hotmail.com
Damned dirty monkeys ;P James Simplicity Rules!
-
If you must know. I posted the message with the following code: this.SetStyle(ControlStyles.DoubleBuffer & ControlStyles.UserPaint & ControlStyles.AllPaintingInWmPaint, true); Which of course would not enable the double buffering. Neil points out my stupid mistake(which I originally had in my other test form, but a monkey came along and changed all the |'s to &'s as a nasty joke, so as you see this was clearly the monkeys fault not mine) this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); So I see Neil'd observation and hit myself. Well evidently I hit my self so hard that when I went to change it I went into the source of my dummy app in which I was testing the control. So the parent form was double buffered correctly. Thinking that I had enabled it in my control I was sad. So I left it alone until now. And after a break and looking in my code again I relize that the monkeys &'s had not be changed to |'s... If it weren't for the monkey I would have been set. Joshua Guy
Sonork ID: 100.9944 ICQ: 519642 Hotmail: JoshuaJGuy@hotmail.com
LOL, I hate it when I do that... :cool: , Errr, The monkeys I mean...