Implementing BeginUpdate in form?
-
Hi! Have created an OnScreenKeyboard in a VB.NET winform but the rendering of the buttons is so slow that when selecting a new keyboard layout you see the buttons disapear and come back one at the time. Although it's kind of a cool effect, it's not what I want for this prjoject. I'd like to implement a BeginUpdate and EndUpdate functions. Do I override the onpaint event or how can I achive this? -- modified at 3:16 Monday 20th February, 2006
-
Hi! Have created an OnScreenKeyboard in a VB.NET winform but the rendering of the buttons is so slow that when selecting a new keyboard layout you see the buttons disapear and come back one at the time. Although it's kind of a cool effect, it's not what I want for this prjoject. I'd like to implement a BeginUpdate and EndUpdate functions. Do I override the onpaint event or how can I achive this? -- modified at 3:16 Monday 20th February, 2006
You can try using the Form's
SuspendLayout
andResumeLayout
methods. CallSuspendLayout
, add all your controls to the FormsControls
collection, then callResumeLayout
. You've run into the problem with using LOTS of controls on a form. They're slow to create and draw. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome