Adding TabControl to a form using controls

In WinForms C # using .Net 2.0, I want to add TabControl to a form that has existing controls. Is there a way to move all controls to a tab control without Visual Studio blowing out all my event handlers? Using Visual Studio 2005.

+7
source share
2 answers

Yes, make the form as possible as possible and draw a tab control on the right side of the form. Then select all the controls on the left side and drag them onto the tab control. Now your event handlers will remain intact and the controls will be well placed on the tab.

+8
source

I would select all the controls in your form, press Ctrl-X (cut them out), place the TabControl in your form and make it as large as you need, then press Ctrl-V to paste all the controls into TabControl. This will maintain the state of all your controls. You will not lose event handlers or anything else.

+1
source

All Articles