troubleshooting Question

[Discussion] Reusing VB code inside a big project

Avatar of Hit_MN
Hit_MN asked on
Visual Basic Classic
3 Comments2 Solutions309 ViewsLast Modified:
Hello, everybody.
I would like to open this question in form of a discussion / survey, more than an ask for help.

This is my point: how do you provide a vay of reusing the VB code in your "large" projects? I'll try to explain what I mean: often, I see that I need the same "piece of code" in different places in the project, with the same behaviour, but pointing to some different data.
For instance, I my recent application I need a "log viewer" that is able to show the contents of the log file, to reorder items, to filter them... etc. That's no problem, but I need the "same code" in different places (i.e. in different forms) pointing to different log files (that is: with different data).

Here is the question: how would you solve that?

1. creating an usercontrol private to the project?
2. creating a "wrapper" class around that particular piece of code?
3. using the Implements keyword?
4. ...other?

Any comment, pointer to another discussion, or article is welcome.

Thanks everybody,

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros