Click here to Skip to main content
13,350,047 members (46,873 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
I used a tab control having multiple pages , based on customer requirement changes , I need to convert this tab control to a user control to be used in many window forms , is there a way to take it from [design] view and convert it to an explicit user control ?

What I have tried:

I encountered this before and I just took it's code implemented in the .designer code and tweak it in a new user control class , but if this is automated it'll save me hours
Posted 9-Nov-17 22:11pm
Updated 9-Nov-17 22:41pm
v2
Comments
GKP1992 10-Nov-17 6:00am
   
You'll have to create it from scratch. Although you can use the browser's developer tools to some extent, most of the work you have to do yourself.
Hermann Jung 11-Nov-17 3:15am
   
Try this:
- copy the form containing your tab control
- rename copied files and class name (in .cs and .desinger.cs)
- open copy in designer and remove all unwanted control and components
- save file
- unload project
- change baseclass of copied form to UserControl
- reload project
- there may be some code-issues in .cs and designer.cs because of changed baseclass; repair them
Good luck!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web01 | 2.8.180111.1 | Last Updated 10 Nov 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100