Need to break up a very large C# program...

I have a very large C# program (currently 740 Kb) that I want to break up (the entire program is developed around a tab control with about 16 tabs on it..)  My thinking is that I might break it up by each tab and it's related functions because the program is just getting too big to manage, especially waiting for VS to re-draw the main form each time I make a change to any of the code.  Although the execution of the program seems to be ok, I just need to figure out a better way to manage the source.

Any suggestions?

rmmarshAsked:
Who is Participating?
 
ozymandiasConnect With a Mentor Commented:
Create separate custom component classes for each tab as controls that inherit from TabPage ?
0
 
rmmarshAuthor Commented:
What would that buy me?
0
 
sabeeshConnect With a Mentor Commented:
create seperate usercontols for each tab item and place the user control in the tabs. so you could write your code in different different controls. this could be more easy and very easy to maintain the code.
Refer msdn for how to use usercontrols
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
ozymandiasCommented:
It would break up your code and make it more managable.
I thought that was what you wanted, quote : ".... I want to break up .... just getting too big to manage..."
0
 
rmmarshAuthor Commented:
OK... just read up (on what I could find) on user controls... please provide some clarification for the following:
1.  There is a "UserCode Designer" component of VS; does or can each user control compile into a .dll?
2.  Any known way of moving existing controls to the Designer? (would probably have to have both projects open at the same time, right?)
3.  Is there an easy way to take some of the code that is pretty much static now and move it into something that will compile into a .dll, like a separate assembly?
0
 
ozymandiasCommented:
>> UserCode designer...not sure what that is.

You can take your controls and compile them into a dll, just create a class library project and move the code into it.
It will compile as a dll.
Create a reference to this dll in your main project and then you can use the controls.
0
All Courses

From novice to tech pro — start learning today.