Discussion:
VB 6 compilation on Linux for execution on Windows and Linux
(too old to reply)
casual basic
2007-04-10 15:06:30 UTC
Permalink
Do you know of Visual Basic versions which can be compiled on Linux
for running on Linux as well as Windows? Something like OpenOffice for
Visual Basic 6.0 and lower?

I am going to have one computer running Linux and one running Windows
XP in near future. I don't want Vista, and I don't want .Net at least
for now. I hope to be able to manage with Linux in future - even
modify my Visual Basic codes, compile them and run them on Linux as
well as let others run it on Windows XP or Vista or whatever. Is this
possible already today?
mayayana
2007-04-10 21:21:14 UTC
Permalink
You can't run VB on Linux directly. You can
install Wine (winehq.org), which is basically
an API interpreter. It hooks the VB calls and
converts them to Linux versions. Wine works
fairly well, but last I saw it was still at least
slightly buggy with virtually all Windows software.
And it's somewhat slow. I think Wine is the kind
of thing that will work in a pinch but it doesn't
provide a smooth transition.

There are also Basic-like environments,
like Gambas. And I think that RealBasic
will compile for Linux. (?) But I haven't seen
a product like that with the flexibility of VB.
They tend to be more equivalent to VB for
beginners.

If you use Wine, the more you stick to API
and avoid COM/ActiveX, the better off you'll
be. Last time I tried Wine was about a year
ago. At that time they were working on improving
COM support, but ActiveX controls were not
working very well. It may be better now, but the problem
with Wine is the same as with most Linux OS
software: It never quite gets out of beta. The Wine
project has been going for years, at least since the
late 90's. They release a new version about every
ten days. But it's still not up to v. 1.0.
Post by casual basic
Do you know of Visual Basic versions which can be compiled on Linux
for running on Linux as well as Windows? Something like OpenOffice for
Visual Basic 6.0 and lower?
I am going to have one computer running Linux and one running Windows
XP in near future. I don't want Vista, and I don't want .Net at least
for now. I hope to be able to manage with Linux in future - even
modify my Visual Basic codes, compile them and run them on Linux as
well as let others run it on Windows XP or Vista or whatever. Is this
possible already today?
Rick Rothstein (MVP - VB)
2007-04-10 21:46:22 UTC
Permalink
Post by mayayana
There are also Basic-like environments,
like Gambas. And I think that RealBasic
will compile for Linux. (?) But I haven't seen
a product like that with the flexibility of VB.
They tend to be more equivalent to VB for
beginners.
REALbasic is quite a mature language, suitable for beginners to learn, of
course, but way more sophisticated than you are implying. In many ways, it
is much more robust than VB6 is. And yes, you can write programs in
REALbasic that can run on Linux (and Macs too).

Rick
mayayana
2007-04-11 02:33:51 UTC
Permalink
Post by Rick Rothstein (MVP - VB)
REALbasic is quite a mature language, suitable for beginners to learn, of
course, but way more sophisticated than you are implying. In many ways, it
is much more robust than VB6 is. And yes, you can write programs in
REALbasic that can run on Linux (and Macs too).
I haven't looked into it much, but I expressed doubt
because when I did look into it I couldn't find anything
about using API. The info. available seemed to all
be on the level of text1.text = "such and such"

Are API calls possible and flexible in RealBasic?
As much so as in VB?
Rick Rothstein (MVP - VB)
2007-04-11 03:04:30 UTC
Permalink
Post by mayayana
Are API calls possible and flexible in RealBasic?
Yes. See here for an overview...

http://aaronballman.com/programming/REALbasic/VbDeclToRbDecl.php
Post by mayayana
As much so as in VB?
Yes, maybe even more so... for example, REALbasic allows multiple threading
(VB is only single threading), so you should be able to make use of API
functions that handle multiple threading (assuming you know what you are
doing), although it may not be necessary to do this as there are built-in
methods for working with threads.

Rick
mayayana
2007-04-11 13:56:35 UTC
Permalink
Post by Rick Rothstein (MVP - VB)
Post by mayayana
Are API calls possible and flexible in RealBasic?
Yes. See here for an overview...
http://aaronballman.com/programming/REALbasic/VbDeclToRbDecl.php
Post by mayayana
As much so as in VB?
Yes, maybe even more so...
Thanks. I had got a different idea last time
I looked into RealBasic.
The thought of moving to anything other than VB
gives me a sinking feeling, but the link looks worth
saving, just in case. (The site menu lists a number
of major topics.)
H-Man
2007-04-12 16:01:27 UTC
Permalink
Post by Rick Rothstein (MVP - VB)
Post by mayayana
There are also Basic-like environments,
like Gambas. And I think that RealBasic
will compile for Linux. (?) But I haven't seen
a product like that with the flexibility of VB.
They tend to be more equivalent to VB for
beginners.
REALbasic is quite a mature language, suitable for beginners to learn, of
course, but way more sophisticated than you are implying. In many ways, it
is much more robust than VB6 is. And yes, you can write programs in
REALbasic that can run on Linux (and Macs too).
Rick
FWIW, I tried RealBasic some time ago and for the most part found it
falling short in many areas. The version I tried was Version 5.5 so it may
be a bunch better now. Updates and upgrades need to be purchased and come
around like once a year, so if you go this way be prepared to get on an
upgrade treadmill. Upgrades are not free. The .exe's created by RealBasic,
at least when I was playing around with it were very large and unreasonably
slow. One advantage for RealBasic is that the learning curve for a VB
programmer isn't bad and the results of the translation utilities, from VB
the RB, leave you with what can, for the most part, be fixed to work. A lot
of times though I found it easier to actually just rewrite. For the most
part though, I really didn't like RealBasic at all.

There are other languages out there that allow for cross platform coding, I
prefer PureBasic, but the curve can be rather large on this one. XBasic is
VB like and can compile Linux binaries. FreeBasic will also compile on
Linux but IMO has a steep learning curve if coming from VB. XBasic and
FreeBasic are open source and are free so may deserve at least a second
look. The reason I chose PureBasic is that it will create very small .exe's
with no runtime dependencies, and the .exes are very efficient, meaning
they are really fast. Most of the time as fast as C code. The main
advantage to using something like XBasic or FreeBasic is that onec you
learn it and get going on it, your development environment is free forever.
BTW XBasic has been around for a long time. PureBasic has free upgrades for
life, so even that is only a one time fee. The danger is of course that it
may become unsupported at some time, but then you're only in the same boat
as you are now, where you need a different product. All of these have great
community support.
--
HK
Rick Rothstein (MVP - VB)
2007-04-12 16:59:12 UTC
Permalink
Post by H-Man
FWIW, I tried RealBasic some time ago and for the most part found it
falling short in many areas. The version I tried was Version 5.5 so it may
be a bunch better now.
The version after 5.5 changed the IDE considerably. I didn't like the many
free-floating windows that existed in Version 5.5... I think the new (now
current) interface is much more intuitive to work with.
Post by H-Man
Updates and upgrades need to be purchased and come around
like once a year, so if you go this way be prepared to get on an
upgrade treadmill. Upgrades are not free.
Yes, upgrades are via a subscription, that is true, but they are issued 4
times a year now.
Post by H-Man
The .exe's created by RealBasic, at least when I was playing around
with it were very large and unreasonably slow.
I have nothing to compare it with except VB6... REALbasic programs seem to
run quick enough as far as I can tell. As for size, well, I'm not sure
exactly how you judge that (remember, VB6 carries a minimum 1.35 Meg file
dependency, VB.NET a 20+ Meg dependency) but it would seem that is not all
that material in this day and age of huge disk drives and large RAM systems.


Rick
H-Man
2007-04-12 18:51:59 UTC
Permalink
Post by Rick Rothstein (MVP - VB)
Post by H-Man
The .exe's created by RealBasic, at least when I was playing around
with it were very large and unreasonably slow.
I have nothing to compare it with except VB6... REALbasic programs seem to
run quick enough as far as I can tell. As for size, well, I'm not sure
exactly how you judge that (remember, VB6 carries a minimum 1.35 Meg file
dependency, VB.NET a 20+ Meg dependency) but it would seem that is not all
that material in this day and age of huge disk drives and large RAM systems.
I know that size can be unimportant in todays terms, but as I recall I
ported a VB app I had created, and the entire package was substantially
larger with RB than for VB6. Also, in my experience, it is quite likely
that Windows users already have VB6 RT installed. Either way I could never
get comfortable with RB. It was as much a feel of the language as much as
anything else. There simply was no payoff, and I absolutely hated the fact
that with every new version available, support answers were simply,
"upgrade to the newest version". I had no intention of spending that kind
of money for what is for me mostly hobby. Right now you would be hard
pressed to get even community support for RB5.5 where community support for
VB6 is still alive and well, as it is for the free options I mentioned and
for PureBasic.

Just my opinion, but there are better and less expensive (short term and
long term) alternatives to RB unless you absolutely need Mac OSx or classic
OS support.
--
HK
mayayana
2007-04-12 20:18:28 UTC
Permalink
I'm finding these comparisons quite interesting.
I've never even heard of XBasic. If you, or someone,
cares to take the time, it would be interesting to
hear a more detailed comparison of differences.
I'm especially interested easy API usage and in
avoiding java/dotnet style OO coding. (Though I
suppose that aspect probably gets more prevalent
with cross-platform coding, since the APIs wouldn't
be directly usable.)
Post by H-Man
Post by Rick Rothstein (MVP - VB)
Post by H-Man
The .exe's created by RealBasic, at least when I was playing around
with it were very large and unreasonably slow.
I have nothing to compare it with except VB6... REALbasic programs seem to
run quick enough as far as I can tell. As for size, well, I'm not sure
exactly how you judge that (remember, VB6 carries a minimum 1.35 Meg file
dependency, VB.NET a 20+ Meg dependency) but it would seem that is not all
that material in this day and age of huge disk drives and large RAM systems.
I know that size can be unimportant in todays terms, but as I recall I
ported a VB app I had created, and the entire package was substantially
larger with RB than for VB6. Also, in my experience, it is quite likely
that Windows users already have VB6 RT installed. Either way I could never
get comfortable with RB. It was as much a feel of the language as much as
anything else. There simply was no payoff, and I absolutely hated the fact
that with every new version available, support answers were simply,
"upgrade to the newest version". I had no intention of spending that kind
of money for what is for me mostly hobby. Right now you would be hard
pressed to get even community support for RB5.5 where community support for
VB6 is still alive and well, as it is for the free options I mentioned and
for PureBasic.
Just my opinion, but there are better and less expensive (short term and
long term) alternatives to RB unless you absolutely need Mac OSx or classic
OS support.
--
HK
H-Man
2007-04-12 21:44:34 UTC
Permalink
Post by mayayana
I'm finding these comparisons quite interesting.
I've never even heard of XBasic. If you, or someone,
cares to take the time, it would be interesting to
hear a more detailed comparison of differences.
I'm especially interested easy API usage and in
avoiding java/dotnet style OO coding. (Though I
suppose that aspect probably gets more prevalent
with cross-platform coding, since the APIs wouldn't
be directly usable.)
XBasic is at http://www.xbasic.org/
It was originally written by Max Reason (with QB as I recall) and creates
fast .exe's but still requires a runtime module. I includes a GUI designer
and isn't a huge step from VB as much of the language is reminiscent of QB.
For the most part the applications created by XBasic have a fairly distinct
look, I think it uses it's own embedded fonts and such for the screens and
labels. It is free and complete though and has great community support. You
should be aware though that calling a WIN32API function does immediately
make the result windows only. XBasic does include compiler directives that
inform the compiler that compile this way for Windows and the other way for
Linux, but if you do something that is Windows API, then you also need to
do that for the Linux libs otherwise it will not be cross platform.

Another really interesting point about XB is that it is actually written in
XB, so once you know the language you can change it or add to it as you see
fit. At one time this was the true measure of a compiler in that the
compiler can actually compile itself. I have no idea who decided to measure
compilers this way, personally for me, if it works, that's good enough for
me.

Really the only way to get a feel for this animal is to download it and try
it. Try some tutorials and read the docs, you should be off. It's been a
long time since I've played with XBasic, but it seemed none too difficult
at the time for me.

Have fun.
--
HK
mayayana
2007-04-12 23:46:25 UTC
Permalink
Thanks. It sounds worth looking into.
Post by H-Man
XBasic is at http://www.xbasic.org/
It was originally written by Max Reason (with QB as I recall) and creates
fast .exe's but still requires a runtime module. I includes a GUI designer
and isn't a huge step from VB as much of the language is reminiscent of QB.
For the most part the applications created by XBasic have a fairly distinct
look, I think it uses it's own embedded fonts and such for the screens and
labels. It is free and complete though and has great community support. You
should be aware though that calling a WIN32API function does immediately
make the result windows only. XBasic does include compiler directives that
inform the compiler that compile this way for Windows and the other way for
Linux, but if you do something that is Windows API, then you also need to
do that for the Linux libs otherwise it will not be cross platform.
Another really interesting point about XB is that it is actually written in
XB, so once you know the language you can change it or add to it as you see
fit. At one time this was the true measure of a compiler in that the
compiler can actually compile itself. I have no idea who decided to measure
compilers this way, personally for me, if it works, that's good enough for
me.
Really the only way to get a feel for this animal is to download it and try
it. Try some tutorials and read the docs, you should be off. It's been a
long time since I've played with XBasic, but it seemed none too difficult
at the time for me.
Have fun.
--
HK
casual basic
2007-05-04 13:04:50 UTC
Permalink
Post by H-Man
There are other languages out there that allow for cross platform coding, I
prefer PureBasic, but the curve can be rather large on this one. XBasic is
VB like and can compile Linux binaries. FreeBasic will also compile on
Linux but IMO has a steep learning curve if coming from VB. XBasic and
FreeBasic are open source and are free so may deserve at least a second
look.
Thank you very much for this information. I think this is the closest
to what I was asking for. I will look into these.

The reason I chose PureBasic is that it will create very small .exe's
Post by H-Man
with no runtime dependencies, and the .exes are very efficient, meaning
they are really fast. Most of the time as fast as C code.
This is also nice, and particularly if you can get a single *.exe
without any supporting DLL or other files you have to carry around. As
far as possible, I do not wish to spend a lot of time learning a new
environment or language.

The main
Post by H-Man
advantage to using something like XBasic or FreeBasic is that onec you
learn it and get going on it, your development environment is free forever.
BTW XBasic has been around for a long time.
X Basic does sound like what I would like. I guess you are also not
forced to go for upgrades and updates of it every few months unlike
with Microsoft stuff.

PureBasic has free upgrades for
Post by H-Man
life, so even that is only a one time fee. The danger is of course that it
may become unsupported at some time, but then you're only in the same boat
as you are now, where you need a different product. All of these have great
community support.
--
HK
casual basic
2007-05-06 11:37:52 UTC
Permalink
To those who are still following this discussion, I found a fairly large
list of Visual Basic alternatives on one Internet site. It includes
XBasic, FreeBasic, PureBasic and dozens of others.

See http://basic.mindteq.com/Tables.asp and http://basic.mindteq.com/WinList.asp

FreeBasic seems to be the best alternative so far.

What is the advantage of Java compared to many of these forms of Basic
which are platform independent, free and do not require us to learn a
new language?

casual basic
2007-04-11 15:48:04 UTC
Permalink
Post by mayayana
You can't run VB on Linux directly. You can
install Wine (winehq.org), which is basically
an API interpreter. It hooks the VB calls and
converts them to Linux versions. Wine works
fairly well, but last I saw it was still at least
slightly buggy with virtually all Windows software.
And it's somewhat slow. I think Wine is the kind
of thing that will work in a pinch but it doesn't
provide a smooth transition.
Thanks for your detailed reply. I read about Wine, and looks like 80%
of the solution. All software of that size will have some bugs, and
probably a lot fewer than Microsoft's, so that does not bother me.

Do I understand this right? I could install VB 6 on Wine sitting on
Linux, and then do (almost) all that I do on Windows including
modifying VB code and compiling it. I am no expert on VB and use very
little API stuff. Then when I make *.exe files, they will run only on
Windows or Wine, not on Linux (but I should not really need to run
them on Linux without Wine).

Wine won't have access to kernel32, gdi32, etc. libraries. Do I have
to avoid these or does Wine work around it?
Post by mayayana
There are also Basic-like environments,
like Gambas. And I think that RealBasic
will compile for Linux. (?) But I haven't seen
a product like that with the flexibility of VB.
They tend to be more equivalent to VB for
beginners.
VB for beginners is not a problem. I tend to be a beginner in VB, and
do not use many "advanced" commands. Is it a better solution to
install other Basic compilers like RealBasic? Will they compile code
which can run on Windows or only Linux?
Post by mayayana
If you use Wine, the more you stick to API
and avoid COM/ActiveX, the better off you'll
I don't use ActiveX and DLLs other than the ones necessary to run
Visual Basic, or any fancy OLEs. I am sure I don't even know what COM
is. Common Dialog I have used once or twice but I can probably work
around that.
Post by mayayana
be. Last time I tried Wine was about a year
ago. At that time they were working on improving
COM support, but ActiveX controls were not
working very well. It may be better now, but the problem
with Wine is the same as with most Linux OS
software: It never quite gets out of beta. The Wine
project has been going for years, at least since the
late 90's. They release a new version about every
ten days. But it's still not up to v. 1.0.
You people are experts on VB and every little thing about VB is
important to you. I am more of a beginner (at least not a professional
by any means), and need mostly the basic facilities of Basic with GUI
(mostly text boxes, commands, list boxes and labels on forms; may be a
picture box or two). In other words, even VB 2.0 equivalent should be
enough for me. I would like to be able to produce *.exe which run on
Windows and preferably also another *.exe which will run on Linux.

What is probably the best way for me? It would be good if you make a
recommendation based on this important fact that I am more or less a
beginner. It would be highly desirable that the version of Basic
(RealBasic or whichever) will not have an abrupt end, i.e. it should
not become suddenly impossible to use that.

Thanks again for your response.
Post by mayayana
Post by casual basic
Do you know of Visual Basic versions which can be compiled on Linux
for running on Linux as well as Windows? Something like OpenOffice for
Visual Basic 6.0 and lower?
I am going to have one computer running Linux and one running Windows
XP in near future. I don't want Vista, and I don't want .Net at least
for now. I hope to be able to manage with Linux in future - even
modify my Visual Basic codes, compile them and run them on Linux as
well as let others run it on Windows XP or Vista or whatever. Is this
possible already today?
Rick Rothstein (MVP - VB)
2007-04-11 16:36:58 UTC
Permalink
Post by casual basic
Post by mayayana
There are also Basic-like environments,
like Gambas. And I think that RealBasic
will compile for Linux. (?) But I haven't seen
a product like that with the flexibility of VB.
They tend to be more equivalent to VB for
beginners.
VB for beginners is not a problem. I tend to be a beginner in VB, and
do not use many "advanced" commands. Is it a better solution to
install other Basic compilers like RealBasic? Will they compile code
which can run on Windows or only Linux?
Standard Version: You buy the compiler version for the opererating system
(Windows, Mac or Linux) and the programs you write get compiled for that
operating system only.

Profession Version: You still buy the compiler version for your operating
system, but you can compile programs for any of the three operating systems
from within it. Of course, that is not the only difference between the
Standard and Professional versions, simply the one that addresses your
question.
Post by casual basic
What is probably the best way for me? It would be good if you make a
recommendation based on this important fact that I am more or less a
beginner. It would be highly desirable that the version of Basic
(RealBasic or whichever) will not have an abrupt end, i.e. it should
not become suddenly impossible to use that.
Microsoft has said that Vista will support VB6 throughout its lifespan; so,
theoretically, it will continue to run there (however, you can probably
expect "minor" problems as incompatibilities are uncovered). Of course,
VB.NET is the new "toy" in Microsoft's arsenal, so it will run in Vista fine
(although many feel Microsoft's abandoning of the VB6 community's assets, no
easy upgrade of code from VB6 to VB.NET, is an omen of what might happen to
VB.NET in the future when a new "toy" comes along). I don't know about
Linux, but I'm guessing that if WINE supports it now, it will continue to do
so (as long as the company stays in business). As for REALbasic, this is the
**only** product that the REAL Software Inc. company makes, so one has to
assume if they want to remain in business, they will actively seek to keep
their product current. My experience with this company so far shows this to
be the case.


Rick
Stan Weiss
2007-04-11 17:19:41 UTC
Permalink
Post by Rick Rothstein (MVP - VB)
Post by casual basic
Post by mayayana
There are also Basic-like environments,
like Gambas. And I think that RealBasic
will compile for Linux. (?) But I haven't seen
a product like that with the flexibility of VB.
They tend to be more equivalent to VB for
beginners.
VB for beginners is not a problem. I tend to be a beginner in VB, and
do not use many "advanced" commands. Is it a better solution to
install other Basic compilers like RealBasic? Will they compile code
which can run on Windows or only Linux?
Standard Version: You buy the compiler version for the opererating system
(Windows, Mac or Linux) and the programs you write get compiled for that
operating system only.
Profession Version: You still buy the compiler version for your operating
system, but you can compile programs for any of the three operating systems
from within it. Of course, that is not the only difference between the
Standard and Professional versions, simply the one that addresses your
question.
Post by casual basic
What is probably the best way for me? It would be good if you make a
recommendation based on this important fact that I am more or less a
beginner. It would be highly desirable that the version of Basic
(RealBasic or whichever) will not have an abrupt end, i.e. it should
not become suddenly impossible to use that.
Microsoft has said that Vista will support VB6 throughout its lifespan; so,
theoretically, it will continue to run there (however, you can probably
expect "minor" problems as incompatibilities are uncovered). Of course,
VB.NET is the new "toy" in Microsoft's arsenal, so it will run in Vista fine
(although many feel Microsoft's abandoning of the VB6 community's assets, no
easy upgrade of code from VB6 to VB.NET, is an omen of what might happen to
VB.NET in the future when a new "toy" comes along). I don't know about
Linux, but I'm guessing that if WINE supports it now, it will continue to do
so (as long as the company stays in business). As for REALbasic, this is the
**only** product that the REAL Software Inc. company makes, so one has to
assume if they want to remain in business, they will actively seek to keep
their product current. My experience with this company so far shows this to
be the case.
Rick
Rick,
Is there an easy upgrade of code from VB6 to Real Basic? I got Real
Basic 5.5 when they were giving it to VB users but have not really done
anything with it.
Thanks
Stan
Rick Rothstein (MVP - VB)
2007-04-11 19:08:07 UTC
Permalink
Post by Stan Weiss
Is there an easy upgrade of code from VB6 to Real Basic? I got
Real Basic 5.5 when they were giving it to VB users but have not
really done anything with it.
REALbasic 5.5 used an older IDE than the current version (called REALbasic
2007). Of course, in the two or so years that have passed since Version 5.5
was new, a lot of new features have been added to the language. Anyway, to
answer your question, there is a conversion facility here...

http://realsoftware.cachefly.net/REALbasic2007r2/VBPC.zip

but I think it is only for the current version of REALbasic. There were
conversions programs for the old versions (even back to Version 5.5 I
think), but I am not sure where to find them now. I'm probably not the best
spokesperson for this company, so your best bet would be to go to the
REALbasic web site

http://www.realsoftware.com/

and use the Support / Ask A Question link to find out directly from the
people who made the product. I will mention that while there are a lot of
similarities between REALbasic and VB6, there are also some large
differences, so you will need to learn the language before you can use it
effectively. There is a decent tutorial available from the REALbasic web
site and the User Guide is reasonably comprehensive, so this would give you
a good start. There are also two new books in the market place (both are
less than a year old), so there is that avenue to learning available also.

Rick
Stan Weiss
2007-04-12 12:43:28 UTC
Permalink
Post by Rick Rothstein (MVP - VB)
Post by Stan Weiss
Is there an easy upgrade of code from VB6 to Real Basic? I got
Real Basic 5.5 when they were giving it to VB users but have not
really done anything with it.
REALbasic 5.5 used an older IDE than the current version (called REALbasic
2007). Of course, in the two or so years that have passed since Version 5.5
was new, a lot of new features have been added to the language. Anyway, to
answer your question, there is a conversion facility here...
http://realsoftware.cachefly.net/REALbasic2007r2/VBPC.zip
but I think it is only for the current version of REALbasic. There were
conversions programs for the old versions (even back to Version 5.5 I
think), but I am not sure where to find them now. I'm probably not the best
spokesperson for this company, so your best bet would be to go to the
REALbasic web site
http://www.realsoftware.com/
and use the Support / Ask A Question link to find out directly from the
people who made the product. I will mention that while there are a lot of
similarities between REALbasic and VB6, there are also some large
differences, so you will need to learn the language before you can use it
effectively. There is a decent tutorial available from the REALbasic web
site and the User Guide is reasonably comprehensive, so this would give you
a good start. There are also two new books in the market place (both are
less than a year old), so there is that avenue to learning available also.
Rick
Thanks Rick,
Stan
mayayana
2007-04-11 19:11:42 UTC
Permalink
I guess that Rick gave the RealBasic info.
Here's what I know about Wine.
Post by casual basic
Do I understand this right? I could install VB 6 on Wine sitting on
Linux, and then do (almost) all that I do on Windows including
modifying VB code and compiling it. I am no expert on VB and use very
little API stuff. Then when I make *.exe files, they will run only on
Windows or Wine, not on Linux (but I should not really need to run
them on Linux without Wine).
Wine is an interpreter. You write your code in
Windows and compile in Windows. (You might be
able to run Visual Studio in Wine, but that's another issue.)

In any version of Linux, you install Wine. Wine has
correlates to Windows libraries. It's like a general
Win32 runtime for Linux. You can also install
specific Windows libraries "under" Wine. Most software
installers will run in Wine. (But maybe not MSI.) What I
meant by installing VB is that you install MSVBVM60.DLL
in Wine. In other words, you install VB support in Wine
and then VB software will work - just like in Windows.

What Wine does is to provide an entire
dummy file system, including a Registry. And it
has its own versions of the common Win32 API
functions. So you don't have to worry about all
of that. You just write for Windows and Wine runs it.
See here for some basic VB-oriented info.:

http://www.jsware.net/jsware/vblinux.php3
Post by casual basic
Wine won't have access to kernel32, gdi32, etc. libraries. Do I have
to avoid these or does Wine work around it?
Almost all of that will work. Wine intercepts the
call and executes a Linux version. It's actually
very clever. And if they ever finish it, it could be
a great way to program on Linux.

The point about COM and ActiveX:

VB makes things easy by "wrapping" the system
libraries in controls. For instance, you can call
the system version of a File Open dialogue, or
you can use the VB control for that. In Wine, the
API call is likely to work much better than the control.

Last year I did a test with a RichTextBox. I set
up a program to use the RichEdit control with
and without API calls. The more I avoided the
easy way and used API, the better it worked.
But that may have improved by now. In any case,
you can get started doing things however you
do them now. If you have bugs then you can look for
alternatives to those specific methods.
David Segall
2007-04-12 05:23:26 UTC
Permalink
Post by casual basic
What is probably the best way for me? It would be good if you make a
recommendation based on this important fact that I am more or less a
beginner. It would be highly desirable that the version of Basic
(RealBasic or whichever) will not have an abrupt end, i.e. it should
not become suddenly impossible to use that.
Change to Java now! It is more difficult to learn than Basic but that
is mainly because it is completely object oriented and that is not the
"natural" way to program. On the other hand, it is the direction all
programming languages are going so you might as well bite the bullet
now. If you use the NetBeans IDE which is identical under Linux and
Windows XP you will find producing a GUI screen no more difficult than
using Visual Basic. You can write a program under Linux and email the
compiler output to a friend who can run it using Windows XP. Have a
look at my "blog" on the topic at <http://ide.profectus.com.au> then
download the NetBeans 5.5 and JDK 1.6 bundle from here
<http://java.sun.com/javase/downloads/netbeans.html>. Try it by
following a "learning trail" at <http://www.netbeans.org/kb/>. Note
the other big advantage of Java; almost everything is free and usually
open source.

I would strongly advise against Visual Basic under Wine for a
beginner. It is difficult enough to debug your own programs. It can be
impossible if you cannot rely on the underlying operating environment.
If you insist on a version of Basic find one that is designed to work
with Linux and Windows.
casual basic
2007-05-04 12:56:19 UTC
Permalink
Post by David Segall
Post by casual basic
What is probably the best way for me? It would be good if you make a
recommendation based on this important fact that I am more or less a
beginner. It would be highly desirable that the version of Basic
(RealBasic or whichever) will not have an abrupt end, i.e. it should
not become suddenly impossible to use that.
Change to Java now! It is more difficult to learn than Basic but that
is mainly because it is completely object oriented and that is not the
"natural" way to program. On the other hand, it is the direction all
programming languages are going so you might as well bite the bullet
now. If you use the NetBeans IDE which is identical under Linux and
Windows XP you will find producing a GUI screen no more difficult than
using Visual Basic. You can write a program under Linux and email the
compiler output to a friend who can run it using Windows XP. Have a
look at my "blog" on the topic at <http://ide.profectus.com.au> then
download the NetBeans 5.5 and JDK 1.6 bundle from here
<http://java.sun.com/javase/downloads/netbeans.html>. Try it by
following a "learning trail" at <http://www.netbeans.org/kb/>. Note
the other big advantage of Java; almost everything is free and usually
open source.
I spent some time looking through the basics of Java. The good things
about Java are that it is free and can be platform independent. It
does not however look like a good tool to design GUIs and include a
lot of functionality that VB allows on each GUI objects like labels,
list boxes, text boxes, etc. Java seems academically correct but not a
good tool for writing either engineering mathematics nor for GUIs. So
you need an IDE to produce a GUI, but I guess it will not have all the
functionality that VB provides.

I have no problem learning Java or something else if it is really
worthwhile, but I also have better things to do, so if there is a good
solution like XBasic or something else which does not require me to
spend a lot of time rewriting the codes we have developed over ten
years, I should not go for Java.
Post by David Segall
I would strongly advise against Visual Basic under Wine for a
beginner. It is difficult enough to debug your own programs. It can be
impossible if you cannot rely on the underlying operating environment.
If you insist on a version of Basic find one that is designed to work
with Linux and Windows.
X Basic might be suitable. I will look into it.
David Segall
2007-05-04 15:32:54 UTC
Permalink
Post by casual basic
Post by David Segall
Post by casual basic
What is probably the best way for me? It would be good if you make a
recommendation based on this important fact that I am more or less a
beginner. It would be highly desirable that the version of Basic
(RealBasic or whichever) will not have an abrupt end, i.e. it should
not become suddenly impossible to use that.
Change to Java now! It is more difficult to learn than Basic but that
is mainly because it is completely object oriented and that is not the
"natural" way to program. On the other hand, it is the direction all
programming languages are going so you might as well bite the bullet
now. If you use the NetBeans IDE which is identical under Linux and
Windows XP you will find producing a GUI screen no more difficult than
using Visual Basic. You can write a program under Linux and email the
compiler output to a friend who can run it using Windows XP. Have a
look at my "blog" on the topic at <http://ide.profectus.com.au> then
download the NetBeans 5.5 and JDK 1.6 bundle from here
<http://java.sun.com/javase/downloads/netbeans.html>. Try it by
following a "learning trail" at <http://www.netbeans.org/kb/>. Note
the other big advantage of Java; almost everything is free and usually
open source.
I spent some time looking through the basics of Java. The good things
about Java are that it is free and can be platform independent. It
does not however look like a good tool to design GUIs and include a
lot of functionality that VB allows on each GUI objects like labels,
list boxes, text boxes, etc. Java seems academically correct but not a
good tool for writing either engineering mathematics nor for GUIs. So
you need an IDE to produce a GUI, but I guess it will not have all the
functionality that VB provides.
A fair comparison between Visual Basic and Java demands that you
compare a Java IDE and not just the Java language. Imagine writing a
VB program using only Notepad.

The NetBeans IDE <http://www.netbeans.org> provides a significantly
better GUI designer than VB Classic. It is at least as good as the GUI
designer in VB.Net. It includes labels, list boxes, text boxes and
every other GUI component provided by VB. It even has an updateable
grid control but it does not have built in database connectivity and
it does not have a report designer. Although SwingSet
<http://swingset.sourceforge.net/> and ireport
<http://jasperforge.org/sf/projects/ireport> respectively provide open
source solutions to this problem, neither is built in to NetBeans.
Post by casual basic
I have no problem learning Java or something else if it is really
worthwhile, but I also have better things to do, so if there is a good
solution like XBasic or something else which does not require me to
spend a lot of time rewriting the codes we have developed over ten
years, I should not go for Java.
I agree. If you have a body of working code and you can find a
cross-platform way of executing it then you should use it. Even so, I
would urge you to use Java for new applications so that you do not
face the same problem the next time you need to change your
environment.
Loading...