In WinForms C# using .Net 2.0 I want to add a TabControl to a Form that has existing controls. Is there a way to move all the controls into a tab control without Visual Studio blowing away all my event handlers the like? Using Visual Studio 2005.
Yes, make the form as large 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 on the tab control. Now your event handlers will remain intact and controls will be placed on the tab control nicely.
I would select all of the controls on your form, hit Ctrl-X (cut them), put the TabControl on your form and make it as big as you need, then hit Ctrl-V to paste all of the controls into the TabControl. This will maintain the state of all of your controls..you won't lose event handlers or anything.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With