Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Installation / Documentation > Unexpected Error When Running


Reply
 
Thread Tools Display Modes
  #1  
Old 06-18-2005, 11:30 PM
GenDeathRaiser GenDeathRaiser is offline
Centurion
 
Join Date: Mar 2005
Posts: 111
Default 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.
Reply With Quote
  #2  
Old 06-19-2005, 12:51 AM
Lintz's Avatar
Lintz Lintz is offline
Senior Contributor
 
Join Date: Mar 2003
Location: The 19th Hole
Posts: 989
Default

Put some error trapping in your app where the error occurs so you can view what is causing the problem.
Reply With Quote
  #3  
Old 06-19-2005, 12:54 AM
GenDeathRaiser GenDeathRaiser is offline
Centurion
 
Join Date: Mar 2005
Posts: 111
Default

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.
Reply With Quote
  #4  
Old 06-19-2005, 01:00 AM
Lintz's Avatar
Lintz Lintz is offline
Senior Contributor
 
Join Date: Mar 2003
Location: The 19th Hole
Posts: 989
Default

Then the error is probably in the Form_Load event.
Reply With Quote
  #5  
Old 06-19-2005, 01:02 AM
GenDeathRaiser GenDeathRaiser is offline
Centurion
 
Join Date: Mar 2005
Posts: 111
Default

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
Reply With Quote
  #6  
Old 06-19-2005, 01:03 AM
webbone's Avatar
webbone webbone is offline
Hydrogen Powered

Administrator
* Expert *
 
Join Date: Jul 2003
Location: Sacramento, CA
Posts: 6,090
Default

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
Reply With Quote
  #7  
Old 06-19-2005, 01:04 AM
GenDeathRaiser GenDeathRaiser is offline
Centurion
 
Join Date: Mar 2005
Posts: 111
Default

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.
Reply With Quote
  #8  
Old 06-19-2005, 02:42 AM
Lintz's Avatar
Lintz Lintz is offline
Senior Contributor
 
Join Date: Mar 2003
Location: The 19th Hole
Posts: 989
Default

To access the P&D Wizard click Start --> Programs --> Microsoft Visual Studio --> Microsft Visual Studio Tools.

HTH
Reply With Quote
  #9  
Old 06-19-2005, 11:06 AM
GenDeathRaiser GenDeathRaiser is offline
Centurion
 
Join Date: Mar 2005
Posts: 111
Default

Thanks but this failed to work, still gets unexpected error.
Reply With Quote
  #10  
Old 06-20-2005, 01:59 AM
Lintz's Avatar
Lintz Lintz is offline
Senior Contributor
 
Join Date: Mar 2003
Location: The 19th Hole
Posts: 989
Default

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?
Reply With Quote
  #11  
Old 06-20-2005, 04:30 AM
GenDeathRaiser GenDeathRaiser is offline
Centurion
 
Join Date: Mar 2005
Posts: 111
Default

Yes, it never made it to form_load to report the error.
Reply With Quote
  #12  
Old 06-20-2005, 07:43 AM
GenDeathRaiser GenDeathRaiser is offline
Centurion
 
Join Date: Mar 2005
Posts: 111
Default

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.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->