Recent

Author Topic: Porting a VB6 Project  (Read 4735 times)

axisdj

  • New Member
  • *
  • Posts: 16
Porting a VB6 Project
« on: May 05, 2014, 04:04:21 am »
Hello,

Just wanted to know if anyone has had success porting a vb6 app to lazarus. I have 3 apps with about 200k LOC and would like to attempt to port it to lazarus.

Are there any Basic dialects that would make converting easier?

Thanks

Edson

  • Hero Member
  • *****
  • Posts: 1055
Re: Porting a VB6 Project
« Reply #1 on: May 05, 2014, 05:27:53 am »
VB6 and Object Pascal are very different languages, no matter which dialect you use.

Porting is possible. The difficult depends on the size and the complexity of the VB6 App. If it use classes and interfaces, probably it would be too hard. It woul be useful to know what kind of App you pretend to port.

I had to change all the architecture in some Apps I have ported. Practically, I have rewritten most of the code on some cases.

If it is possible, you could start porting some independent parts of the App. It will be more secure.

Anyway, you can ask some specific question of the porting. There are very helpful people here for to answer.
« Last Edit: May 05, 2014, 05:42:53 am by Edson »
Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

Deepaak

  • Sr. Member
  • ****
  • Posts: 444
Re: Porting a VB6 Project
« Reply #2 on: May 05, 2014, 06:08:35 am »
Yes, Porting a vb6 project is possible, but there is no project conversion tools available currently, so its a time consuming depends on the type of application. Just have a try and share your expirence.

Ooops Holiday season is offline now.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 831
Re: Porting a VB6 Project
« Reply #3 on: May 05, 2014, 06:22:58 am »
Visual Basic and Free Pascal are very different languages.
I have seen people rewriting VB programs in Lazarus, not porting them.
It is a manual job, without help of tools or wizards.

Have you checked if Gambas would be a solution for you?
http://en.wikipedia.org/wiki/Gambas

If you start rewriting one of your VB programs in Lazarus from scratch, we can try to help you on specific doubts.

Start from this topic :
http://forum.lazarus.freepascal.org/index.php/topic,24125.0.html

If possible also take a look on:
http://wiki.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines
http://forum.lazarus.freepascal.org/index.php?topic=15795.0
http://forum.lazarus.freepascal.org/index.php/topic,22143.msg130344.html#msg130344
http://forum.lazarus.freepascal.org/index.php/topic,22142.msg130251.html#msg130251
« Last Edit: May 05, 2014, 06:32:09 am by valdir.marcos »

avra

  • Hero Member
  • *****
  • Posts: 1717
    • Additional info
Re: Porting a VB6 Project
« Reply #4 on: May 05, 2014, 10:08:24 am »
There are VB to Delphi convertors mentioned here:
http://forum.lazarus.freepascal.org/index.php/topic,12763.msg66330.html#msg66330

They are mainly used for header conversions, but they can help you with rough start up conversion following a lot of manual work.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib