Recent

Author Topic: vb6 Binding to Lazarus  (Read 10756 times)

axisdj

  • Jr. Member
  • **
  • Posts: 64
vb6 Binding to Lazarus
« on: July 20, 2014, 05:42:15 pm »
Hello All,

Was not sure where to post this, but here goes.

I am working on a crowdfunding project to develop a true replacement for the Visual Basic 6 ide and compiler. To start the funding project, I need to have a solution to offer.

We currently have 2 options as of right now.

1. Fund Olaf Schmidt's vbrichclient to evolve into a full vb6 replacement
2. Fund a project to create a true 100% compatible binding to Lazarus.

I would like to get in contact with the person in the Lazarus team that would be able to tell me if the Lazarus team would be interested in 2.

I believe it would be a great move forward to the growth of the Lazarus Community. Adopting hundreds of thousands of vb6 devs would really grow the Lazarus support base greatly, in my opinion.

BTW I think Lazarus is an amazing piece of work...

Anyone can email me directly at axisdj@world-net.net.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: vb6 Binding to Lazarus
« Reply #1 on: July 20, 2014, 09:41:40 pm »
I would like to get in contact with the person in the Lazarus team that would be able to tell me if the Lazarus team would be interested in 2.

I believe many people are interested. Yet, I don't believe Lazarus developers would join your VB project.
You will get help on the way if you have detailed technical questions though.

What kind of bindings you plan?
Would it be a VB compiler based on FPC or would it be a converter from VB code to Pascal?
In both cases the problem comes from libraries. VB syntax may be easy to convert to Pascal but all different library APIs are not. So it would be very difficult to use existing VB code.

I personally don't think your plan is very realistic but good luck anyway. :)
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

CM630

  • Hero Member
  • *****
  • Posts: 1082
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: vb6 Binding to Lazarus
« Reply #2 on: July 21, 2014, 10:02:21 am »
VB6 is dead. A man with small round glassed killed it a long time ago. :-X
Trough all these years there have been attempts to revive it, but none of them got anywhere.
Some migrated to VB.NET, some to C#, and many went dead. I am migrating to Lazarus. It might not be as good as VB6, but it is multiplatform and support multithreading.
I hope you will find support, but I do not believe it.

Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: vb6 Binding to Lazarus
« Reply #3 on: July 21, 2014, 10:11:08 am »
Hmm, lazarus components are mostly dependent on TComponent which is an TinterfacedObject which supports IUnknown :-)

IOW there is a certain measure of VB compatibility simply because Delphi can. But e.g. string properties etc will be hard, since the default Delphi string types in any version are not com compatible.

In that sense, the LCL interface is a superset of COM with 30+ basetypes that can be in a variant.
« Last Edit: July 21, 2014, 10:23:02 am by marcov »

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: vb6 Binding to Lazarus
« Reply #4 on: July 21, 2014, 10:12:11 am »
Probably off topic, but for a slight chance that OP might find it useful, there are tools to help migrating VB headers to Pascal (good) and whole code (not good at all):
http://forum.lazarus.freepascal.org/index.php/topic,12763.msg66330.html#msg66330
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: vb6 Binding to Lazarus
« Reply #5 on: July 21, 2014, 05:58:18 pm »
Basic syntax conversion would be easy from VB6, but not the API calls, the libraries, the user controls, the error treatment, the calls to external dlls or ocx ...

Moreover, the architecture or a VB6 program, use to be some limited, with no real OOP. Then, even if you would success on conversion, you would have a mess of code with probably no options for maintaining.

I think a tool for conversion could be useful, but not for a whole project. Just for saving time on codify some rutines o modules (with simple algorithms) or some forms or dialogs.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

axisdj

  • Jr. Member
  • **
  • Posts: 64
Re: vb6 Binding to Lazarus
« Reply #6 on: July 22, 2014, 03:43:20 am »
Let me clarify.

I am working on a crowd funding project. We would like to see if any of the Lazarus team would be able and willing to bind the vb6 syntax and ide behavior to the current Lazarus. If the project funds, we would be able to compensate those involved.

The goal is to be 100% compatible with vb6 so that any vb6 project (within reason) can be edited and compiled.






BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: vb6 Binding to Lazarus
« Reply #7 on: July 22, 2014, 07:41:43 am »
bind the vb6 syntax and ide behavior to the current Lazarus.
I think you are using the wrong terms.

It seems to me you want
1. A VB6 compatible compiler. Or do you have some kind of existing compiler that can be called from within Lazarus?
2. Make Lazarus compatible with VB6 forms and controls and able to pass source code to the compiler in 1.
(3. Presumably you already have VB6 libraries with controls etc?)

Of these tasks, 2 is probably the easiest task.
I strongly suspect there is not much interest from people to implement 1, but I may be wrong...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: vb6 Binding to Lazarus
« Reply #8 on: July 22, 2014, 07:45:54 am »
Maybe you should create a new project "LVB6 - Lazarus for Visual Basic 6" forking Lazarus IDE and learning from the experiences and sources of Lazarus itself, Gambas and Orwell Dev-C++.

1. You can fork Lazarus and build a new IDE for VB6 with all the advantages provided by Lazarus.
2. Gambas only works on Linux, but it is very similar to VB6 language and IDE.
3. Orwell Dev-C++ is a 10 year IDE project build on Delphi 7 to help programmers of C++.
4. Talk to the developers of the above projects and learn from them.

Visual Basic and Free Pascal are very different languages.

http://en.wikipedia.org/wiki/Gambas
http://gambas.sourceforge.net/en/main.html
http://www.brgambas.com/

http://en.wikipedia.org/wiki/Dev-C%2B%2B
http://orwelldevcpp.blogspot.com.br/
http://sourceforge.net/projects/orwelldevcpp/

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: vb6 Binding to Lazarus
« Reply #9 on: July 22, 2014, 10:38:34 am »
I am working on a crowd funding project. We would like to see if any of the Lazarus team would be able and willing to bind the vb6 syntax and ide behavior to the current Lazarus. If the project funds, we would be able to compensate those involved.

Lazarus' concept is deeply hooked into the language and RTL, specially the designer   So the choice of base toolchain (compiler/assembler/linker) is absolutely crucial.

Personally, this funding concept sounds too mercenary to me. You want sb with passion for the task to take the work (even if he is compensated for his time). Success and the quality of the outcome depends too much on a bit of interest in the job itself.

Handing over a wad of cash to whoever says he can do the job without proven VB credentials seems shaky to me.

Moreover, *I* would never take a job that specified "100% compatibility with VB", such things are always another magnitude off (90%,99%,99.9% etc). State verifiable goals.

Besides that, I think you severely underestimate the amount of work, if there is no 100% compatible free VB compiler and libraries.  Lazarus and FPC try this for Delphi, and it has been a 10-20+ person 10+ year effort.  Admitted, that would be somewhat less fulltime, but still quite sizable.
« Last Edit: July 22, 2014, 10:40:18 am by marcov »

Deepaak

  • Sr. Member
  • ****
  • Posts: 454
Re: vb6 Binding to Lazarus
« Reply #10 on: July 22, 2014, 11:45:52 am »
I agree with @marcov

Holiday season is online now. :-)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: vb6 Binding to Lazarus
« Reply #11 on: July 22, 2014, 12:03:08 pm »
Lazarus' concept is deeply hooked into the language and RTL, specially the designer   
Could you explain a bit more about the designer being deeply hooked into the language and RTL, especially in light of this thread:
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-nonlcl-widgetsets-td4037356.html
edit and especially
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-nonlcl-basic-issue-is-codetools-LCL-dependent-td4037528.html

My understanding is that full functionality of the designer is only available for the LCL but that Giuliano is working with Mattias to loosen that...
« Last Edit: July 22, 2014, 12:39:36 pm by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: vb6 Binding to Lazarus
« Reply #12 on: July 22, 2014, 12:54:02 pm »
Lazarus' concept is deeply hooked into the language and RTL, specially the designer   
Could you explain a bit more about the designer being deeply hooked into the language and RTL, especially in light of this thread:
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-nonlcl-widgetsets-td4037356.html
edit and especially
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-nonlcl-basic-issue-is-codetools-LCL-dependent-td4037528.html

My understanding is that full functionality of the designer is only available for the LCL but that Giuliano is working with Mattias to loosen that...

For a CLX codebase, which is like, VCL' .   The main problem there is that the component registration-by-name is too similar even. Of course the usual suspects are promoting their own wishes, but Giuliano is talking about CLX.

Since VB6 afaik has heavy RTTI there are some possibilities of course.  My point is more that the proposal seems to skip so many steps going directly to the IDE before talking about the basesystem.
 
Basically all the proposal does is to point to a magic word "crowdfunding" to raise money, and the rest is open.
« Last Edit: July 22, 2014, 01:59:44 pm by marcov »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: vb6 Binding to Lazarus
« Reply #13 on: July 22, 2014, 12:58:56 pm »
Basically all the proposal does is to point to a magic word "crowdfunding" to raise money, and the rest is open.
Yes, that is the sense I get as well... not even an outline of what architecture exists/is planned/would be necessary...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: vb6 Binding to Lazarus
« Reply #14 on: July 22, 2014, 02:08:36 pm »
It seems a compiler is needed too, but the Olaf guy wants to make an own one generating C. (not that bad as a quick fix, OTOH I would join or fork FreeBasic if I went in that direction)

http://www.vbforums.com/showthread.php?770635-What-if-there-was-a-NEW-vb6&p=4719231

I see a budget of 50k, which would be doable for the IDE alone, but is unrealistic (by magnitudes IMHO) for compiler+libraries+ide and a compatibility requirement. The thread seems also to sway between modernize/multiplatform and compatible.

Fun detail is that XeroCode is named, which is afaik Lazarus based (partially?):

http://forum.lazarus.freepascal.org/index.php/topic,22236.msg134008.html#msg134008
« Last Edit: July 22, 2014, 02:37:37 pm by marcov »

 

TinyPortal © 2005-2018