Link to home
Create AccountLog in
Avatar of mshox1
mshox1

asked on

conversion from vb6 (ide) to vb.net(IDE) - specific qustion on use the "common utility".vb

I have a specific question on how to structure the vb.net program.

In our situations, many of our applications that written in vb6, have a common utility section of the code that contains all the common functions, and subroutines.   These functinos and subtoutine/methods are used by our various applications.

I know in vb.net, there is a way to put all this common utility in a places say called "common_utility.vb", and can be referedor called by every program.  either from debugging purpose or compiled exe versions.   This is very similiar to "%include source_code_path"  in other procedures language, such as PL1.

Is there anyway, we can have the similar way to structure of our current vb6 source code in this fashion?  so the vb6 -> vb.net wizard can convert the vb6 to vb.net in a more clean and easy way?

ps.  we have good reason not to use DLL for this cases.

thank you for your help
Avatar of mshox1
mshox1

ASKER

why there is NO one give any attention to this qustions?
it has been over 7 month from the time I request.

is the statement like following

imports common_utility.vb

works?


Please response

thank you
7-19-2014
Avatar of Chris Watson
The standard for this would be to place the code you want to share in a separate assembly and reference it from the assemblies you wish to consume the shared functionality. However, as you've already ruled this out, there's nothing stopping you linking the same file to multiple projects in a solution. If the projects in which you wish to consume the shared functionality are not in the same solution perhaps you could achieve the same effect by way of svn:external properties (or whatever equivalent is offered by whichever version control system you are using).
ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of mshox1

ASKER

I like add as Link ideal.  I will give it a try to make sure it works the way I antifipate.

to answer your questions why not use dll.   the reason I do not want to use dll is that in our situations, we frequently need to use "debug" mode to execute some simple or temp change modifications.  -- we even not save the changes.   use "link", then we can step through the "common.vb" code to control the process.   if we use dll approach, we need to be engage a formal change control process...  this is just a trade off between 2 approach that best suite our working enviorments.

I will close the solutions after I get a chance to experiement/verify your approach.  thanks again
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of mshox1

ASKER

thank your addtional experts comments of vb.net can debug and step throught the DLL.  I will give addtional considerations.

Lets discuss further of "add as link" to the project.  is there a similar way in vb6?   I like to start from VB6. set the common_utility.bas as the link to my project.   I will then use that as the base to apply the converstion wizard provided by 2008 vb express.   any new program after my converstion done, will for sure use "add as link" method to construct the source code.

Please advise
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
I've requested that this question be deleted for the following reason:

The question has either no comments or not enough useful information to be called an "answer".
There's plenty of pertinent information here, especially from James Burger. I don't agree with this question being deleted.
I agree with Chris Watson.
Avatar of mshox1

ASKER

agree, this solutions have plenty of information.  consider solved.  thank you
How did I wind up with the points? I definitely shouldn't get them.
Avatar of mshox1

ASKER

sorry for my late response.  I consider this solution closed.  I would like give Mr. Berger full credit for his solutions.  thanks