vb6 Binding to Lazarus lazarus / 8-Other ---------------------------------------------------------------------- axisdj · 2014-07-20 15:42 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 · 2014-07-20 19:41 Quote from: axisdj on July 20, 2014, 05:42:15 pmI 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. ---------------------------------------------------------------------- CM630 · 2014-07-21 08:02 VB6 is dead. A man with small round glassed killed it a long time ago. 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. ---------------------------------------------------------------------- marcov · 2014-07-21 08:11 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. ---------------------------------------------------------------------- avra · 2014-07-21 08:12 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.htm l#msg66330 ---------------------------------------------------------------------- Edson · 2014-07-21 15:58 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. ---------------------------------------------------------------------- axisdj · 2014-07-22 01:43 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 · 2014-07-22 05:41 Quote from: axisdj on July 22, 2014, 03:43:20 ambind 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... ---------------------------------------------------------------------- valdir.marcos · 2014-07-22 05:45 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. Quote from: valdir.marcos on May 05, 2014, 06:22:58 amVisual 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 · 2014-07-22 08:38 Quote from: axisdj on July 22, 2014, 03:43:20 amI 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. ---------------------------------------------------------------------- Deepaak · 2014-07-22 09:45 I agree with @marcov ---------------------------------------------------------------------- BigChimp · 2014-07-22 10:03 Quote from: marcov on July 22, 2014, 10:38:34 amLazarus' 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... ---------------------------------------------------------------------- marcov · 2014-07-22 10:54 Quote from: BigChimp on July 22, 2014, 12:03:08 pmQuote from: marcov on July 22, 2014, 10:38:34 amLazarus' 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. ---------------------------------------------------------------------- BigChimp · 2014-07-22 10:58 Quote from: marcov on July 22, 2014, 12:54:02 pmBasically 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... ---------------------------------------------------------------------- marcov · 2014-07-22 12:08 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.ht ml#msg134008