[Gambas-user] Migrating to Gambas

John Dovey dovey.john at gmail.com
Thu Jun 10 00:10:28 CEST 2021

Thanks for all the advice. All taken in the spirit it was given.
I've migrated one app twice. From VB6 -> VB.Net and from VB6->Gambas. The
simpler migration was VB6->Gambas.
I find the best is to dump code into the new environment, then work through
the errors. Some things don't translate well.. and for those wrapper
functions are, I agree, the best solution.

Once strange one is the ability to split strings[*]. I ended up writing an
"explode" function where I could make the tweaks to how it worked, so that
through the code I replace all the splits with explode, then I modify
explode as needed.. That approach seems to be working quite well.

All the best

* Gambas: http://gambaswiki.org/wiki/lang/split
* VBA/VB6:
* VB.Net:

On Wed, 9 Jun 2021 at 07:59, KKing <kicking177 at gmail.com> wrote:

> Most of our VB6 migration so far have been console based apps, or ones
> that literally only had a handful of buttons so haven't had to delve
> into "Forms" migration too much. But one thing to bear in mind is if you
> used the old shortcut to a field via an "&" in the label description is
> not the same.
> You need to add a separate TextLabel field and put e.g. "<u>P</u>review"
> in the Text of the control to get the visual of an underlined "P" in the
> text of "Preview" and then on the form do something like
> <<
> Public Sub Form_KeyRelease()
>    Dim inTest01 As Integer
>    inTest01 = Key.Code
>     If Key.Alt Then
>       Select Case inTest01
>         Case 76
>           ' do stuff
>         Case 80
>           ' do stuff
>         Case Else
>            inTest01 = inTest01
>       End Select
>     Endif
> End
>  >>
> As people have alluded to (or forthrightly said) will depend on the
> structure of your old code and I am not casting any aspersions!
> We always had "DIM" at top of routines and used Option Explicit and a
> certain amount of consistent structure.
> Most of our pain with the code I think you have already encountered
> arrays () vs [] and double vs float.
> Some more pain was in converting some jet/access mdb usage. When it was
> read-only we used ODBC+mdbtools otherwise we have converted to sqlite.
> There is certainly some benefit if the code works and you have a number
> of people familiar with it to migrate not start from scratch.
> K
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210609/e265c741/attachment-0001.htm>

More information about the User mailing list