Discussion Locked

Advise to convert a VB-project in COMpon

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi guys!
I need you advice to handle this problem.
I have a project in VB 6.0 which is not based on components, was programmed without classes and the code is included
in every form and in some BAS files.
So is a big project with a lot of forms and a very heavy exe (around 15 MB).
Now I need to divide this project in components (Active X DLL) both forms and code, the project include Sales, Purchase and Warehouse modules so I'll try to create components for each one.
What is your advising to do this division?,because some code is a mess..many dependencies between forms,etc!
Somebody have had a similiar experience?
What is the better way to make this transition?
Where I can get references to guide me in this process to convert this project in components?
I really appreciate your time,thank you in advance!

5 replies

by madestroitsolutions

Well, I will start by saying this Mr. TSoft:
you are basically SCREWED, he he. The only way you can probably accomplish this is doing it by hand. Go form by form. Get the relevant code. For example, if you are working on a sales module first, go to the form, and get all the code that does the operations. then you make a new DLL project, and divide the code into methods of a given class. you might want to make a sales DLL, create a class called SalesOp and give it methods like SaveOrder(byVal OrderNumber as long), OpenOrder ByVal OrderNumber as long) as recordset, etc, etc. Once you have done this and compiled it, then you reference it on the actual project. Then you simply use the methods of the class.

This is a little complicated, so It cannot really be explained here. However, I would be willing to help you with some advice for free if you e-mail me at: juanja01@OptOnline.net, or actual work for a reasonable fee, he he. Let me know how it goes, It's a very interesting situation.

Good luck!

by jerry e

T,

I think Juan has the answer. To shrink the .exe you have to consolidate code. Create Dll's for each concept (Sales Order) and put all functionality for that concept in that dll. Try to get rid of all Globals and dependencies. looks like a rewrite

This discussion is closed to new replies.