views:

459

answers:

4

I have a VB6 application that still references some old VB5 libraries (dll, vbr, tlb, and ocx). We're having some strange issues like it can't read the registry using advapi32.dll. I've tried running the application with UAC permissions, but still no go. We can't recompile the app because it has several controls and components that cannot be found to download and are no longer supported. Any ideas (besides a rewrite since we already are working on that) are appreciated.

To add, we've already tried this application in Windows XP Mode. However, here are my "gripes" with doing that:

  • Windows that are loaded as vbFormCenter and vbModal are centered between dual monitors. Even after dragging it to one of the monitors, it doesn't remember where the modal should be.
  • When trying to print, at random, it takes up to 5 minutes for a job to spit out. This is because (or at least I'm thinking this is the reason) the XP Mode machine loads printers from the host as well.
  • Some DCOM communication seems sluggish at random
  • A printer hooked up via USB can only be on the host or the VM and not both because it uses pass through. Even so, you can't "force" an application to allows have a printer attached.
  • Older applications (VB5 and VB6) don't always close out when Application.Exit is called. Not sure why this is, but you can open up a form and call the Exit sub when a button is clicked and out of 25 times, 10-20% of the time it doesn't close. So, there is no way to show the application as a sub-process on the host machine so it can be killed.

Phew. That's just a few.

A: 

This may be a silly question, but have you tried running it in compatibility mode?

R. Bemrose
Yes, does not work.
Jason N. Gaylord
A: 

You could try using a windows XP virtual machine...assuming it doesn't need to run directly on the host.

drakaan
See my comment above.
Jason N. Gaylord
Not virtual PC...try virtualbox...Once the VM is created and (with the VM powered off) go to the "Details" tab in the VirtualBox console.Click on the "USB Controller" link. In the popup window, select the "USB devices" check box and right click on the USB "plus" icon.Select the printer. If the printer does not show up, you may not have had the printer connected and on when you powered up the guest.After that, you should be able to use the printer through virtualbox
drakaan
+2  A: 

VB 5.0 is not supported on Windows 7, although VB 6.0 is, so I'm guessing that's your problem.

The solution to this is to run a windows xp virtual machine, and windows 7 has a pretty painless process for doing this using xp mode.

Check out,

http://www.microsoft.com/windows/virtual-pc/download.aspx

mattdlong
Tried that and it doens't work properly. All of the windows load in the middle of the screen and it hangs for up to 5 minutes when it tries to print (because it loads the printers from the host, etc). In addition, if you have a local printer setup, you can't force it to be attached and even if you could, then the host machine couldn't use it.
Jason N. Gaylord
So I think, given VB5 isn't supported on window7, you've really only got two options, find a way to get the virtual machine working as you need it to, or roll back to windows xp until your re-write is complete.Sorry to be the bearer of bad news, good luck!
mattdlong
That's what I thought.
Jason N. Gaylord
A: 

An alternative to the XP Virtual Machine which has some advantages is Parallels. It's cheap, robust and offers a neat transparency mode such that the program running in the VM appears to be running as native on the desktop. I've been using Parallels on my Windows 7 computer since it came out to run several XP desktops for legacy client software development, and it works a treat.

Cruachan
Nice suggestion, but would rather not have to purchase anything.
Jason N. Gaylord