Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: conditional compiling


Message #1 by "sandhya" <gsr_sandyi@r...> on Tue, 7 Jan 2003 17:01:26
Sorry, you lost me with this second posting.

Code reusability is a major issue, and you are right saying that you
want to share those four forms.

Let's say that you have Form1 to Form4 that are used in Project1,
and Project2 uses Form1 to Form4 and FormA to FormZ. Isn't this
enough? You make two projects (the first with the first four forms)
and a second one (adding the last series of forms)
What's wrong in this? Sure you have to rebuild your applications,
but you have to do it anyway...

Conditional compiling does not help you. If you put 30 forms in a
project but you use only four of them, VB still allocates the space
needed for all of the 30 forms.

Sharing forms has a minor problem: if you add a component to the
form (let's say mscomctl.ocx), you have to remember to open all the
projects using that form and add that component to all of them.
Quite painful, this is why I still prefer to wrap common forms
in a dll (as alreday suggested) This has another advantage: you
modify a form, build your dll and that's it! No need to update
any of the applications that use that dll.

Marco


> but my question is different.

>    actually my application is standard exe. all the forms have visual 
i> nterface. now out 25/26 only four forms are part of one application and 
a> gain the 25/26 forms build the second application. reusability of those 
f> our form would reduce duplicate codes which is a mazor problem. because 
i> f any form has even a minor change again i have to build the two 
a> pplication which is time consuming and problamatic always.

>    could there be solution to this

> sandhya
 >   

  Return to Index