Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Nov 21, 2019 1:59 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Converting from Visual Basic
PostPosted: Thu Feb 24, 2011 10:51 am 
Offline

Joined: Wed Jan 31, 2007 9:01 am
Posts: 273
Location: Saratoga Springs, NY area
Hi,

With a lot of help from a colleague (who is proficient in Visual Basic), Ive developed an animation (recently discussed elsewhere in this forum) in Visual Basic. I've used the VB Migration Assistant and produced an rbp, removed (hopefully) unnecessary commenting. Done what I can. A few items are still needing a fix to complete the conversion, but I'm not sure how to fix these.

If I can get the project working in RB, this opens the possibility of building it for Mac, Linux, maybe even web. Great REAL features!

I would much appreciate if someone can take a look and suggest what remains to be done to complete a successful conversion.

I'll post the rbp in a zip folder at: http://elearningprojects.com/Animation1.zip

Thanks in advance for your help.

Kind Regards,

_________________
writer

Windows 7 Home Premium 64 bit, Core i7, 8G RAM, ATI Radeon HD5770, Release 2011r3


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting from Visual Basic
PostPosted: Thu Feb 24, 2011 12:06 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
I took a quick look at it. You need to try to compile. All the errors (or at least for a while because I gave up) are from trying to implement an event that is under a different name in RB. The Picturebox_Click event will end up being in the PictureBox.MouseDown event and so on. TBInterval_Scroll becomes TBInterval.ValueChanged and so on.

The tops of the converted functions contain lines like
Parameters: ....
Return type: ....

Comment all of those out.

Otherwise, it looks close. I did NOT do all these things so there are probably some other bugs.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting from Visual Basic
PostPosted: Thu Feb 24, 2011 12:25 pm 
Offline

Joined: Wed Jan 31, 2007 9:01 am
Posts: 273
Location: Saratoga Springs, NY area
Hi Bob,

Thanks for your reply and suggestions.

I'll try these.

Kind Regards,

_________________
writer

Windows 7 Home Premium 64 bit, Core i7, 8G RAM, ATI Radeon HD5770, Release 2011r3


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting from Visual Basic
PostPosted: Thu Feb 24, 2011 12:52 pm 
Offline

Joined: Wed Jan 31, 2007 9:01 am
Posts: 273
Location: Saratoga Springs, NY area
Hi,

I made changes. When I run the project, the first warning dialog is attached as a screen shot. I tried making some changes, but was not successful.

Any suggestions appreciated.

Image

Not sure how to fix this.

Kind Regards,

_________________
writer

Windows 7 Home Premium 64 bit, Core i7, 8G RAM, ATI Radeon HD5770, Release 2011r3


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting from Visual Basic
PostPosted: Thu Feb 24, 2011 12:57 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
[quote="Bob Keeney" The Picturebox_Click event will end up being in the PictureBox.MouseDown event.[/quote] You need to convert from the VB event (_Click) to the equivalent in RB.

You absolutely need to understand what is happening in VB6 to be able to convert properly. If you can't do that then we really can't help you much.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting from Visual Basic
PostPosted: Thu Feb 24, 2011 1:16 pm 
Offline

Joined: Wed Jan 31, 2007 9:01 am
Posts: 273
Location: Saratoga Springs, NY area
Hi Bob,

With hobbyist/amateur skills, I probably don't know enough about the VB design nor RB syntax to get this working in RB. :(

Kind Regards,

_________________
writer

Windows 7 Home Premium 64 bit, Core i7, 8G RAM, ATI Radeon HD5770, Release 2011r3


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting from Visual Basic
PostPosted: Thu Feb 24, 2011 1:21 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
I disagree. I know plenty of hobbyists that have figured out RB. But it *IS* a development language and you need to do some homework to figure it out.

Applications don't get programmed magically. Sadly, RS hasn't developed an ESP module/class yet.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting from Visual Basic
PostPosted: Thu Feb 24, 2011 2:10 pm 
Offline

Joined: Wed Jan 31, 2007 9:01 am
Posts: 273
Location: Saratoga Springs, NY area
Hi Bob,

I agree. I was simply trying to comment on my lack of skills and not make any predictions about the learning capability of others, whether as hobbyists/amateurs or professionals.

For example, what I would need is a more basic "cross-walk" (maybe in a list format) between VB and RB syntax to apply in order to successfully make the conversion. ('If this,' then 'substitute this,' type of thing.) I have a general idea of what VB is doing (the code is commented), can see the "basic's" like using mouse down as a substitute for click, etc. But, some of it is still eluding me.

I think that RB is a great software, with enormous, X platform capability. I've been a fan for quite a while. That's one reason for me to want to try to convert this, so I can make it available for Mac, Linux, maybe web users, in addition to the Windows users who can be served by a VB or RB executable.

Best Wishes,

_________________
writer

Windows 7 Home Premium 64 bit, Core i7, 8G RAM, ATI Radeon HD5770, Release 2011r3


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting from Visual Basic
PostPosted: Thu Feb 24, 2011 2:20 pm 
Offline

Joined: Mon May 31, 2010 5:35 am
Posts: 2412
Location: Netherlands
Bob Keeney wrote:
I disagree. I know plenty of hobbyists that have figured out RB. But it *IS* a development language and you need to do some homework to figure it out.

Applications don't get programmed magically. Sadly, RS hasn't developed an ESP module/class yet.


Like me..

Topic:
Back to converting, you need to poit each event call from within the class itself.
So if you where in a "window" you cant raise an event for a class called "myclass" properly as VB does.

If you read trough the docs, youll get there..;)
http://docs.realsoftware.com/index.php/UsersGuide:Chapter_10

and here:
http://docs.realsoftware.com/index.php/RaiseEvent

youll read this:
Quote:
The only place you can use RaiseEvent is in the class definition where you added the Event Definition. In particular, you cannot raise an event from an instance of the class on the window, nor can you raise the event from outside the class. f you want to arbitrarily call an event, you will need to create a supporting method within the class as well that raises the event.

_________________
SWORT™
- Windows Vista, Windows XP, Windows 7, Linux Mint 11 and Mac OSX Lion
- REAL Studio Enterprise(latest) and WEB Edition(latest)
- Plugins (MBS Complete, ToringoLib, Einhugur, VanHoek + Some open source plugins)
For Dutch User Groups ask me to enter!


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting from Visual Basic
PostPosted: Thu Feb 24, 2011 2:47 pm 
Offline

Joined: Wed Jan 31, 2007 9:01 am
Posts: 273
Location: Saratoga Springs, NY area
Hi swort,

Thank you for your encouragement, explanation and suggestions.

I appreciate the homework references which can help me better understand the differences between VB and RB and support making a more successful conversion.

Again, my thanks to Bob and swort.

Kind Regards,

_________________
writer

Windows 7 Home Premium 64 bit, Core i7, 8G RAM, ATI Radeon HD5770, Release 2011r3


Top
 Profile  
Reply with quote  
 Post subject: Re: Converting from Visual Basic
PostPosted: Thu Feb 24, 2011 2:53 pm 
Offline

Joined: Mon May 31, 2010 5:35 am
Posts: 2412
Location: Netherlands
writer wrote:
Hi swort,

Thank you for your encouragement, explanation and suggestions.

I appreciate the homework references which can help me better understand the differences between VB and RB and support making a more successful conversion.

Again, my thanks to Bob and swort.

Kind Regards,


No problems, we all had to learn it once..;)

_________________
SWORT™
- Windows Vista, Windows XP, Windows 7, Linux Mint 11 and Mac OSX Lion
- REAL Studio Enterprise(latest) and WEB Edition(latest)
- Plugins (MBS Complete, ToringoLib, Einhugur, VanHoek + Some open source plugins)
For Dutch User Groups ask me to enter!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group