We help IT Professionals succeed at work.

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

360 Views
Last Modified: 2014-09-15
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
Comment
Watch Question

Author

Commented:
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 WatsonSoftware Developer
CERTIFIED EXPERT

Commented:
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).
CERTIFIED EXPERT
Top Expert 2015
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
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
CERTIFIED EXPERT
Top Expert 2015
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
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
CERTIFIED EXPERT
Top Expert 2015
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Martin LissSocial distance - Don't touch your face - Wash your hands for 20 seconds
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
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 WatsonSoftware Developer
CERTIFIED EXPERT

Commented:
There's plenty of pertinent information here, especially from James Burger. I don't agree with this question being deleted.
CERTIFIED EXPERT
Top Expert 2015

Commented:
I agree with Chris Watson.

Author

Commented:
agree, this solutions have plenty of information.  consider solved.  thank you
Martin LissSocial distance - Don't touch your face - Wash your hands for 20 seconds
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
How did I wind up with the points? I definitely shouldn't get them.

Author

Commented:
sorry for my late response.  I consider this solution closed.  I would like give Mr. Berger full credit for his solutions.  thanks
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.