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
.NET ProgrammingMicrosoft DevelopmentVisual Basic Classic

Avatar of undefined
Last Comment
mshox1

8/22/2022 - Mon
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
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
Jacques Bourgeois (James Burger)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
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
Your help has saved me hundreds of hours of internet surfing.
fblack61
SOLUTION
Jacques Bourgeois (James Burger)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
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
Jacques Bourgeois (James Burger)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Martin Liss

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".
Chris Watson

There's plenty of pertinent information here, especially from James Burger. I don't agree with this question being deleted.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Jacques Bourgeois (James Burger)

I agree with Chris Watson.
mshox1

ASKER
agree, this solutions have plenty of information.  consider solved.  thank you
Martin Liss

How did I wind up with the points? I definitely shouldn't get them.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
mshox1

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