Need Help Choosing Events To Place Commands to Speed Up Paint Operations on .NET TabControl
Posted on 2011-10-26
I am building a Windows PC application in Visual Studio 2008 using VB and the .NET 3.5 Framework.
Most of my main application form is covered by a TabControl. The clickable tabs themselves are hidden, but they are programmatically clicked via Main Menu commands and Main Toolbar buttons. This programmatic clicking causes different content (controls, tables, charts, etc.) to appear within the the main application form just under the Main Toolbar.
Most of my tabs populate slowly, especially those populated with UserControls associated with records on database tables. I think paint speed would be accelerated significantly if I could invoke the SuspendLayout/ResumeLayout commands whenever a programmatic click of a TabControl tab occurs.
My question is: which events of the TabControl object should I place the commands in? Ideally, the SuspendLayout would be invoked before tab content painting begins, and ResumeLayout would be invoked just after tab content painting ends.
Thank you, Stu Engelman