Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 Debug Run vs EXE Run

Status
Not open for further replies.

sanders720

Programmer
Aug 2, 2001
421
US
I have a program that worls flawlessly in VB6 when run it from within VB6. So, when I compile to an EXE file and run it, I get a Windows error.

Program has encountered a problem and needs to close. We are sorry for the inconvenience. It then offers to send Microsoft an error report.


Any thoughts would be appreciated! The program is being used on Windows XP and Windows 2000 machines.
 
Does this app run as an executable on the machine used to compile it? If it does, then your problem is *probably* dependencies. Your app is probably using an external control or dll that does not exist on the other computers.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
It is not running right on the same machine that the debugging was done on. Any other thoughts?
 
If there is a part of the program that has a problem, then you might still run the program and not come across this particular contextual problem. However, when you compile, the compiler detects the error and halts.
But this would happen during the compilation, as you create the .exe and not after when you run the .exe

Another guess is:
You have a file within the VB project folder which is used/accessed by the program.
Depending on where you are putting the .exe, and wether the file path is relative or hard-coded, when it runs, it cannot find this file because it looks in an inaccessible folder and so it crashes (depending on what file it is).

Eman_2005
Technical Communicator
 
Is this a GPF type of error or a VB error? Do you have error trapping to catch unexpected errors and print them out?

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
I had a similar situation in my EXE. It was running fine within VB6 and fail to work after creating into exe. Later I found a never-ending loop was there in my code.
If I am not wrong you can hit CTRL+F5 to run the app in full compile mode within VB6 window.

Zameer Abdulla
Visit Me (New Look & style)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top