[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2995
  • Last Modified:

Runtime Error 31037 "Error while file is loaded"

I did a system and a tried to install it in a commputer that doesn't have Visual Basic. When I try to read a file with
the Common Dialog this error appears (Error 31037 "Error while file is loaded"). The program works fine on  some other
machines, I don't know what is happening. Could it be that the resident machine has a 486 processor and the development machine and the others have a pentium processor?
I work with three common dialogs in differents parts of the system. In one part the common dialog open my file fine. In other menu option of the program I used another common dialog an it couldn't open the same file.
I hope you can answer my question.
Pepe
Thank you
I am using VB 4. The machine where the problem rise use Windows 95. The versions of the common dialog I use are comdlg32.ocx (Common Dialog Custom ActiveX Control Version 5.0)
I am not adding extra controls. I am using the normal common dialog.
I expect your answer.
Pepe
0
al361345
Asked:
al361345
1 Solution
 
al361345Author Commented:
Edited text of question
0
 
cmoore23Commented:
Some questions for you that may help in diagnosing your common malady.....

Are you talking Visual Basic 3, 4 or 5?
Are your machines using Windows3.1, 3.12 or Windows95?
Are you using cmdialog.vbx, commdlg.dll?  What versions?
Are you using comdlg32.ocs, comdlg32.dll?  What versions?

If you run your application and invoke the 'working' common dialog then re-run the application and invoke the 'non-working' common dialog, what happens? (Both work? Both fail? one fails, one works?)


Are both 'parts' of your application in the same .EXE file?

Are you doing anything *special* such as adding extra/custom buttons to the dialog box etc that are not achieved via the standard common dialog interface?  

If you can answer some of these it will help.

Chris.
0
 
al361345Author Commented:
Edited text of question
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
al361345Author Commented:
Edited text of question
0
 
cmoore23Commented:
'Runtime Error 31037 "Error while file is loaded' can frequently
occur when a number of DLLs have conflicting versions.  That is
my first guess.

On the computer where you created your program, start EXPLORER and :

1) RIGHT CLICK on the file C:\WINDOWS\SYSTEM\COMDLG32.OCX. Then select PROPERTIES from the popup menu and click the VERSION tab. Write down the version number.

2) RIGHT CLICK on the file C:\WINDOWS\SYSTEM\COMDLG32.DLL.  Then select PROPERTIES from the popup menu and click the VERSION tab. Write down the version number.

THEN:

On the computer where your program errors, start EXPLORER and :
3) RIGHT CLICK on the file C:\WINDOWS\SYSTEM\COMDLG32.OCX.  Then select PROPERTIES from the popup menu and click the VERSION tab. Write down the version number.
4) RIGHT CLICK on the file C:\WINDOWS\SYSTEM\COMDLG32.DLL.  Then select PROPERTIES from the popup menu and click the VERSION tab. Write down the version number.

Update your question to include the versions of all these files.

Also, can you tell me how you distribute your program to the other computer.  Do you just copy the .EXE file or do you use the Visual Basic Setup Kit?


0
 
web_crusherCommented:
copy the vb4 commondialog that you're using to your \winsys\ directory
then it will work fine - dont forget to update the comdlg32.ocx - you can find it anywhere in the net - or on http://www.nonags.com - under missing files options!
0
 
al361345Author Commented:
Thank you web_crusher. I did what you told me and it didn't work. I expect more coments from you.
0
 
al361345Author Commented:
Adjusted points to 200
0
 
al361345Author Commented:
I use the setup kit to distribute my program. It worked fine only once, but after that I started to have problems.
0
 
cmoore23Commented:
Pepe, try this:

First copy COMDLG32.DLL from your 'working' machine to the 'not working' machine.

Then copy COMDLG32.OCX from your 'working' machine to the 'not working' machine.

Then TEST your program.

If it still does not work, REJECT my answer and I will try again to help you.




0
 
al361345Author Commented:
Thank you, cmoore23, It worked. Sorry I hadn't time to verify the answer until now.
Thank you again.

361345
0
 
cmoore23Commented:
Pleased to be of assistance  :)

0
 
MirkwoodCommented:
Bought This Question.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now