Vb6 Migration

Hi there, courageous people! I’m very happy reading that most of you comes from vb6 and I feel myself less scared. I just downloaded Xojo, and I think it’s very friendly and looks similiar to vb ide. But as normal, i’m trying to understand the way to start a new project, using old concepts, searching for events, methods and other. To understand better, I have tried to convert a simply application compiled in vb6, but i am really confused:
Where are my subs?
There is a way to call old methods like Form Load, Activate etc?
Why importing a simply project, i don’t see the subs which vb6 project contains?

I think i’m using a bad approach. Can anyone help me to start my experience in a better way, suggesting me how to proceed? Consider that i always had developed applications that connect to access database using ado and this is all my works do. I hope to receive your help and i Thank you in advance.
Johnny

Subs are called Methods.

You create a method by right clicking on a Window, or App, and select “Add Method” .

In the source, you will see the same syntax :

sub myMethod(parm as string) end sub

However, each method is self-contained and has its own editor.

Form Load and activate are replaced by Show.

For instance :

[quote]Window2.Show
[/quote]

You maybe right though : trying to understand Xojo from a VB6 standpoint does not work very well.

May I suggest you go step by step from the beginning with reading Introduction to programming. It will help you familiarize with the way things are done in Xojo, and quickly you will better feel at home.

See also the user guide, and other litterature available at http://documentation.xojo.com/

Fact is, what you learned with VB can be applied, but you first need to know how to navigate and use the Xojo IDE.

I don’t know Xojo so I don’t know if this still works but . If you open your VB6 files in a text editor you can copy any method directly as long as you start at Function(…) and end at End Function. Somebody who uses Xojo can explain how

Yes, it works.

Typically, here is a method that one can readily paste into a Window :

Public Sub Hello() Msgbox("Hello, World") End Sub

Xojo and VB do share a lot of similarities underneath. The huge difference is in the way one accesses subs, functions and events. In VB, they are all presented in the same listing, which BTW can become quite confusing.

In Xojo, each method (sub or function) or event is its own thing, with its own code editor. As a result, one quickly comes to see them as entities more than a piece of code lost in a huge listing. It quickly helps organize the structure of the program. And when looking at code, one does not have to look for along minutes for a particular method. It is right there, represented graphically, in the navigator.

Form_Load is the Open event.
Form_Activate is the Activate event.

You will find the others in the Event Handler:

Thank you so much to all of you! I feel comforted by your words, so I think to try every step you suggest.
To be continued…(!)

Sometimes it’s helpful to see someone else doing it. If you’d like some video training we have over 65 hours available to subscribers at http://xojo.bkeeney.com/XojoTraining/. We have two complete start-to-finish desktop applications and a start-to-finish web application. Of the 200+ videos most come with source code that you can use in your own project.

These might be helpful:

Did you download VB Migration Assistant ?

The link is in the Extras (right) on the xojo download web page.

Nota: I do not come from VisualBasic so I never have to run it.

I have migrated many applications from VB6 to Xojo. Follow Michael’s advice, and go through an example in the documentation. After you get used to the Xojo interface, you will find it easier than VB6. You will also find this board to be very responsive. If you get stuck, just post your question here.

One other comment I’ll make is that many first time users of Xojo, coming from another language, get frustrated with Xojo because it doesn’t do like their old IDE/Language. If you find yourself struggling with that come back to us because there’s generally a better Xojo-way of doing it. So rather than force xojo to do it like VB6 ask us how we’d do it. Will solve much heartache if you do.

Almost all Xojo users come from VB6 so we understand you.
You will be making a lot of mistakes that are simply cristalized memories from VB6, I still forget to put “then” on IF conditionals after years of Xojo because in VB6 it was optional…

“then” is not optional in VB6. If you don’t put in there, the IDE will scream.

“then” is optional in VB.Net, but only in multi-line “If” syntax. It is not optional in single line “If” syntax.