Search code examples
vb6crashruntimeredistributable

VB6 Application Silently Crashes on Startup/Form Loading


I have a VB6 app that loads initially (for a small prompt to enter a license key, only on the first time). It works fine on my machine (windows 7).

I had complaints of it crashing on someone else's machine (both xp and 7), so I made a Windows XP virtual machine. I installed it on the virtual machine, it crashed. I wanted to see where it crashed so I installed Visual Studio on the virtual machine so that I would get a debug prompt. When I ran the program again, it worked.

I am more familiar with C++ and had these kinds of problems, so I figured it was some sort of runtime issue.

I found this VB6 SP6 Redistributable Runtime:

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=24417

I installed that, and it still wouldn't run.

Any ideas where to go from here?

Edit:

I have tried depends.exe, it only shows MSJava, which I've heard I can ignore. Does depends.exe also show things like .ocx (Active X controllers?) that are required?

Also, from the cmd prompt, %errorlevel% doesn't seem to get populated. Is that a VB6 things, or does that indicate that this is truely a crash and not a user exit?


Solution

  • Open the Visual Basic project and check both "References" and "Components" under the "Project" menu.

    Since it is crashing with the VB runtime installed it is likely a component that you have referenced in the project that either does not exist (or is not registered) on the client under test.

    This should be a simple fix.