Link to home
Start Free TrialLog in
Avatar of CyberSoft
CyberSoftFlag for United States of America

asked on

Unexpected error when app is run on another machine (ImageList control issue)

Hi there,

Been struggling with this issue for the last two days to no avail. I've put together a VB6 application that uses the ImageList and Toolbar controls from MS Windows Common Controls 6.0 (SP4). They app runs perfectly well within the IDE and as a compiled EXE on my machine (Windows 2000 SP4).

However, when I run the app (after installing it using an installer built using InstallShield Express 4) on another Windows 2000 SP4 machine it returns with an error dialog simply saying Unexpected Error.

If I revert to a previous version of my app (without all the nice graphical buttons, icons and toolbars etc) it works fine. As soon as I add the ImageList control it generates this error upon running on the other machine. Adding SSTab controls and Toolbar controls did not affect the app - it only displayed the error message after adding the ImageList control.

I have checked and double-checked all the DLL's used by the app to make sure they were included in the installation package and also that the ones used on the other machine are exactly the same (or newer) than those on my machine (on which the app was built).

I then tried to build the app (from the previous version) with using the Toolbar and ImageList controls from Microsoft Windows Common Controls 5.0 (SP2) and it works fine - however I want to use the controls from 6 (SP4) because the toolbar can have rollover states whereas the 5.0 (SP2) version of the controls can't and look really crap IMHO.

I have tried everything I can think of to try and get around this but it doesn't help - I keep getting the Unexpected Error message when running the app. I have full error trapping and logging in my application - I even put a call as the very first line in my frmMain_Load sub that writes to the Windows Event Log and nothing is written so it doesn't even get to the "first" line in the code when running the application.

The app also does not work (with those 6.0 controls) on Windows XP - but funnily enough, it DOES run on a Windows 98 SE machine?????!!!!!

Does anyone have any help in this regard - it's doing my nut in!

Thanks in advance.
CyberSoft
Avatar of TheQuestion
TheQuestion

Avatar of CyberSoft

ASKER

Thanks TheQuestion.

I've tried installing the VB6 SP5 runtime file installer on the machine - installs okay but when I run the app it still gives me the same error.

Regards,
CyberSoft
Can you tell me if theres and numbers or descriptions and exactly what line does it give you the error?
are you running  on your VBSP5??
There are unfortunately no error numbers or line numbers - it's a simple MsgBox that comes up with a red X icon in it with the message Unexepected Error and an OK button.

I'm updating my VS with SP5 to see if that helps. Will let you know.

Regards,
CyberSoft
Does installed VS with SP5 help?
Nope - unfortunately installing VS SP5 and recompiling the EXE and the installer did not help on the other machine - same symptoms.

Back to the drawing board....
Can you create a simple project and try?

To idenfity what is an error, on which line?

Also check mscomctl32.ocx version. I have 6.0.88.62
Check the size of mscomctl32.ocx in the development machine and Installed machine
I've checked the version, size and timestamp of all the OCX and DLL files referenced by the app and they are the same on the target machine as they are on the development machine.

What I've now done - wihch I didn't want to because of the time involved - is begin a NEW VB app with the controls I suspected were causing the problem and do you know what? The app works without any problems on the other machines!?!?!

So I'm going to have to rebuild my app from a new application - at least I can use the code from the previous app but I'll have to manually add/resize/rename all my controls again - what a nightmare. If this works it will mean that it is something entirely different causing the error in my current app.

Regards,
CyberSoft
ASKER CERTIFIED SOLUTION
Avatar of CyberSoft
CyberSoft
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Unfortunately no one's answer actually help me solve the problem. I recommend that the moderators PAQ this question so that other's can benefit from it when searching for answers.

Regards,
CyberSoft