English 中文(简体)
Getting a VB6 Application to Work in Windows 7 If You Can t Recompile
原标题:

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.

最佳回答

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

问题回答

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

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

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.





相关问题
Prevent windows from queuing shellexecute requests

Win.ShellExecute 0, "open", "C:dirprogram.exe", "arguments", vbNullString, SW_SHOWNORMAL Win.ShellExecute 0, "open", "http://www.google.com", vbNullString, vbNullString, SW_SHOWNORMAL I want google....

Why is My Loop Only Deleting One File?

Using VB6 In a folder, i have n number of files, i want to delete a 0 kb files code Dim filename5 As String filename5 = Dir$(txtsourcedatabasefile & "*_*", vbDirectory) MsgBox filename5 Do ...

How to check the filesize?

Using VB6 I have the text file with different sizes, so i want to delete the file where filesize = 0 kb. How to make a vb6 code for deleting the 0 kb files. Need vb6 code Help

File Rename problem?

I m using VB6 and I have a folder where I have n number of files. I want to change the file extension to .txt. I used the code below to change the extension of all .fin files to .txt. Dim filename1 ...

Error 20728-F while in using Crystal Reports in VB6

I m using Crystal Reports in my VB6 project, but I m facing error while loading the report in crystalreport1.action=1; Please give me some solution for this problem. It is showing the error as Error ...

DllRegisterServer entry point was not found

When running my vb6 application I am getting error like, runtime error 53 : file not found: rscomclNoMsg.dll then i tried to register that dll from cmd line using regsvr32. Then I am getting ...

SQL Server 2000, ADO 2.8, VB6

How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8

热门标签