 |
 |

06-18-2005, 11:30 PM
|
|
Centurion
|
|
Join Date: Mar 2005
Posts: 111
|
|
Unexpected Error When Running
|
I've found multiple topics on this but to no avail none have helped me. Basically when running my compiled program on another computer, not my own, they get the very descriptive error message "Unexpected Error" on my computer I do not get it. I assume this is because I have different files then they do. The only component added, is the winsock one, and even programs with no components will give unexpected error. How can I fix this and make my compiled program run on their computers. Please help.
|
|

06-19-2005, 12:51 AM
|
 |
Senior Contributor
|
|
Join Date: Mar 2003
Location: The 19th Hole
Posts: 989
|
|
|
Put some error trapping in your app where the error occurs so you can view what is causing the problem.
|
|

06-19-2005, 12:54 AM
|
|
Centurion
|
|
Join Date: Mar 2005
Posts: 111
|
|
|
I don't know where it occurs because it works only on my PC, and no one elses, as soon as they try to run the exe it gives this message, they never even see the gui.
|
|

06-19-2005, 01:00 AM
|
 |
Senior Contributor
|
|
Join Date: Mar 2003
Location: The 19th Hole
Posts: 989
|
|
|
Then the error is probably in the Form_Load event.
|
|

06-19-2005, 01:02 AM
|
|
Centurion
|
|
Join Date: Mar 2005
Posts: 111
|
|
|
But the program works on my computer! It's just a bug with one of the components, possibly newer/older than mine. I don't know if this is the case though, as I can't see a program running right somewhere but not somewhere else and the error being in form_load
|
|

06-19-2005, 01:03 AM
|
 |
Hydrogen Powered
Administrator * Expert *
|
|
Join Date: Jul 2003
Location: Sacramento, CA
Posts: 6,090
|
|
A couple things:
1) Did you build an installer using the PD&W, Inno or some other installation program and then run this on the other computers? If not, the problem is likely that some DLL is not installed on the other computers - create an installer and use that to place your application on other machines.
2) If you did build an installer, etc. then look to your startup code - either SubMain or Form_Load for your main form. There isn't a simple way to do this at times other than to pepper your code with a few MsgBox "I got to X" lines - when you get the error you will have a clue as to how much of your code has already exectued.
One more suggestion - put an error handler in your startup code:
Code:
Option Explicit
Private Sub Form_Load()
On Error GoTo StartupErrorHandler
'your startup code goes here...
Exit Sub
StartupErrorHandler:
MsgBox "Error occurred in Form_Load: " & Err.Number & "-" & Err.Description
End Sub
This won't tell you WHERE the error is occuring but it might help with WHAT is causing it.
|
__________________
"With the appearance of the AddressOf operator, an entire industry has developed among authors illustrating how to do previously impossible tasks using Visual Basic. Another industry is rapidly developing among consultants helping users who have gotten into trouble attempting these tasks." -Dan Appleman
|

06-19-2005, 01:04 AM
|
|
Centurion
|
|
Join Date: Mar 2005
Posts: 111
|
|
|
Do not have an installer, do not know how to make one, just know how to hit Make Blah.exe, as this is one of my first programs. If you could explain to me how I could go about making an installer that has the components in it please explain, because with my knowledge i cant even tell you what files are necessary to run it.
|
|

06-19-2005, 02:42 AM
|
 |
Senior Contributor
|
|
Join Date: Mar 2003
Location: The 19th Hole
Posts: 989
|
|
To access the P&D Wizard click Start --> Programs --> Microsoft Visual Studio --> Microsft Visual Studio Tools.
HTH 
|
|

06-19-2005, 11:06 AM
|
|
Centurion
|
|
Join Date: Mar 2005
Posts: 111
|
|
|
Thanks but this failed to work, still gets unexpected error.
|
|

06-20-2005, 01:59 AM
|
 |
Senior Contributor
|
|
Join Date: Mar 2003
Location: The 19th Hole
Posts: 989
|
|
|
Did u create a setup using the P&D Wizard and run it on another machine?
Did you also put in some error reporting code into your Form_load event?
|
|

06-20-2005, 04:30 AM
|
|
Centurion
|
|
Join Date: Mar 2005
Posts: 111
|
|
|
Yes, it never made it to form_load to report the error.
|
|

06-20-2005, 07:43 AM
|
|
Centurion
|
|
Join Date: Mar 2005
Posts: 111
|
|
|
Ok I fixed the problem, turns out either the icon or the background image was causing the problem, I guess they need to have it on their comp in the location i select it from. I took the icon and graphics out.
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|