I have a tab control that has 4 tabs. Each tab contains a user control that I add programmatically when the program loads first. For some reason, the second tab-page loads slowly when I click on it, but the other tabs load normally. This tab contains about 20 controls (text fields, drop-down lists, lists, etc.), but there are no images or anything like that. This page also has the same number of controls as the rest. Is there a way to speed up tab switching? Can I preload a tab at startup?
Note: on the start switch, it is slow.
This is how I add Usercontrol
tabPage2.Controls.Add(userControl_1); // // userControl_1 // userControl_1.Anchor = ((AnchorStyles.Top | AnchorStyles.Bottom) | AnchorStyles.Left) | AnchorStyles.Right; userControl_1.Location = new System.Drawing.Point(0, 0); userControl_1.Name = "userControl_1"; userControl_1.Size = new System.Drawing.Size(878, 646); userControl_1.TabIndex = 0;
source share