|
-
Jul 20th, 2004, 12:37 PM
#1
Thread Starter
Frenzied Member
breaking up a large program [RESOLVED]
I have this project ive been working on for several month. It' become so huge now that when switching from designer to code views, it takes an entire minute to refresh itself. This is largely because of the 700 or so controls.
The program is simply a bunch of tabs that (mostly) work independantly from each other. Is it possible and is it desireable to take each tab page, create a seperate project from that and somehow insert that into the main project's tab control?
is it possible to compile each of those projects as a dll and just use that as a 'control'?
any advice would be greatly appreciated.
Last edited by Andy; Aug 13th, 2004 at 11:58 AM.
-
Jul 20th, 2004, 06:06 PM
#2
Sleep mode
Why don't you group each tabcontrol (including its controls) into multiple user control . This would treat each tabcontrol as one control . Easier to place , move on the form .
-
Jul 20th, 2004, 06:17 PM
#3
Thread Starter
Frenzied Member
cool. what's the easiest way to go about that? I don't exactly know what a 'multiple user control' is. UNLESS you simply mean to create a custom control that is a snapshot of the tab?
-
Jul 20th, 2004, 06:23 PM
#4
Sleep mode
'User Control' = a control that groups multiple controls...I can't explain it at the moment . I'm losing my words...
Example 1
Example 2
-
Jul 20th, 2004, 08:51 PM
#5
Thread Starter
Frenzied Member
awesome! i'm gonna use that for sure!
-
Jul 20th, 2004, 08:58 PM
#6
Sleep mode
Originally posted by Andy
awesome! i'm gonna use that for sure!
Don't be too hasty , some techniques will not work as expected , though they look like exactly what you are looking for.I had similar situations where I had to write my code and design everything twice ... You should test it throughly , so you won't get stuck later . You make sure that you understand it right . GoodLuck.
-
Jul 20th, 2004, 09:35 PM
#7
Thread Starter
Frenzied Member
thanks for the heads up. I DID run into something already...am I gonna have to create a property for each control inside the user control just to be able to access them? ie, a textbox or datagrid embedded in the usercontrol: if I need to manipulate data such as text or backcolor.
if that's the case, it may be more work making these tab pages into user controls.
-
Jul 20th, 2004, 11:07 PM
#8
Sleep mode
I believe you don't have to do that . The whole thing about user controls is to reuse that whole set of controls as one control . What the guy was showing in the example is just changing the behaviour and the functionality of the user control so he can have it ready for any application .
-
Jul 21st, 2004, 07:00 AM
#9
Thread Starter
Frenzied Member
ah, i see. i still can't access those individual members however. What I did was this:
i right clicked on a tabControl and selected "copy"
then, I pasted that onto the designer of the 'user control' i then copied the code, the entire class that was created and saved that.
I repeated this process until I had a 'library' of classes. I no longer have a 'designer' per se. just a library of code. might that be the problem? what I was trying to accomplish was one dll full of tab-page-like controls. if I have to create a separate user control for each, that'll be ok too, huh? although, i like the convience of having all those 'controls' in one library.
-
Jul 21st, 2004, 07:24 AM
#10
yay gay
If you put them as public then you can access them
\m/  \m/
-
Jul 21st, 2004, 10:15 AM
#11
Sleep mode
Originally posted by Andy
ah, i see. i still can't access those individual members however. What I did was this:
i right clicked on a tabControl and selected "copy"
then, I pasted that onto the designer of the 'user control' i then copied the code, the entire class that was created and saved that.
I repeated this process until I had a 'library' of classes. I no longer have a 'designer' per se. just a library of code. might that be the problem? what I was trying to accomplish was one dll full of tab-page-like controls. if I have to create a separate user control for each, that'll be ok too, huh? although, i like the convience of having all those 'controls' in one library.
I tried that and even without exposing the properties . Combining controls into one that does specific job and in specific design makes more sense than composing all the controls in one control .
PT Exorcist could be right .
-
Jul 21st, 2004, 06:59 PM
#12
Thread Starter
Frenzied Member
yep. i changed the scope of all the controls to Public and everything is fine thanks y'all!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|