Click to See Complete Forum and Search --> : How I managed to run VB6 under Linux!!


Shawn Curry
12-16-2002, 11:32 PM
This is another relatively undocumented thing that I wanted to do. But, after searching long and hard, I finally found the solution.

I know, people told you that you should run VB under Windows. Right tool for the right job?? Pffft!! I want to boot Windows as little as possible!

The steps I took:

1. Download wine (codeweavers 7) (http://wine.codeweavers.com/)
- I had a version of Wine pre-installed (RH 8); however, I couldn't get VB to run.

2. Install it (I had to try a couple times before I got it to install?)

3. Find the directory where the executable is, and set this in your path.(/opt/wine/bin for me)

4. Log in as a REGULAR USER.(it wont work if you're logged in as root or you are su)
- Note that you must have the wine path set for this user, unless you set it globally.

5. Run winesetup (follow the directions on the website)
- It should autodetect all the important stuff but there may be some things you want set (screensize, etc)

6. Change to the directory of the program you want to run, and use wine to run it.
- [shawn@localhost vb98]$wine vb6

7. Make a script!!


It is a little buggy, for example if I want to resize the form, I have to enter it numerically. Then again, there may be an option in Wine (manage windows... I'll have to give it a try). But all in all, it suits my needs. The only reason I'm using it is for my intro to programming class, and i'm not making any executables. If you seriously want to program with VB, I seriously reccommend you use something else. Qt designer feels a lot like VB(property editor, etc), and if you stick to the Qt widgets, you can get your program to run under Linux AND Windows (there is a free Qt library for Windows). The difference is that Qt is C++, and it's got better standard documentation.(My VB doesnt have ANY help files... go figure).

Good Luck!

Sastraxi
12-24-2002, 12:14 PM
Good on you! Personally, I wouldn't do this, because I'm trying to 'break free' of VB and go onto C++, which is hard, because VB is always accessable to me in Windows. I feel that if I got 'away' from it, I'd stop using it, you know what I mean? Good job :D

If you're looking for help in VB, I'm always at vbforums.com. I, and the tens of thousands of others there can help you :)

... and there's always the MSDN, an invaluable resource.

tzimsce
12-24-2002, 12:25 PM
um, if it is a little buggy than i don't think too many folks are going to install Visual Basic that way. in Windows, things just work. of course, that wouldn't bother folks like who don't mind wasting a day trying to make something work. pffft.

Shawn Curry
12-26-2002, 02:13 AM
How I UN-did it!! :p

NOTE: for this to work (easily), you need to install VB under Win 95/98/ME. I just formatted both of my hard drives - mainly to conquer my 7200 RPM 8.9ms WD Caviar, which had previously contained only Windows XP. So I reinstalled XP, and took the rest for Linux, and put the other HD into another computer I was building for my folks.

So, when I reinstalled codeweavers and ran winesetup, it failed to find anything in msdos.sys. Also, when it loads VB, it fails to find "stdole2.tlb" which I'm assuming is a related symptom.

But, wine makes no claims of being able to run anything under XP anyhow. Oh well.

Shawn Curry
12-27-2002, 02:23 AM
How I RE did it!!!

For anyone that's interested - I've been playing around with it - figured some stuff out and maybe it could help you if you're trying it out.

I picked up a little 2 gig and installed Windows ME and VB on it. Apparently the Wine I was using (Codeweavers 7 (http://wine.codeweavers.com/)) was looking for Windows on the first partition it could find when you run the configuration utility. It would only autodetect the registry settings when the utility first runs. Thus it kept seeing Windows XP, and it couldnt find the files it was looking for.

So, I went into my /etc/fstab and commented the Win XP line, and rebooted. Then when I ran the utility, it got the right settings from Win ME, and I was back in business.

When you change your settings after this, you must elect to edit the current configuration rather then overwrite it. It throws out your old configuration and autodetects a new one, and if you have XP on a higher partition, it will find that, and you'll have to do it all over again (unless you're a wine expert and can configure it manually, in which case you probably don't need my help anyhow.)