|
-
Dec 20th, 2005, 09:50 AM
#1
Thread Starter
Frenzied Member
Failed to load control MSFlexGrid error
My office PC was recently replaced and I am now getting the following error when launching one of my apps:
Run-time error '372';
Failed to load control 'MSFlexGrid' from MSFLXGRD.OCX. Your version of MSFLXGRD.OCX may be outdated. Make sure you are using the version of the control that was provided with your application.
This app was developed on my previous Win2K PC. I now have a WinXp PC. After re-installing VS 6.0 and copying my source and exe files from the old system, I set up new shortcuts to my apps and tested them.
Sometime later, the app with the flexgrid began throwing the 372 error. I have tried re-creating the exe with no luck. However, the app will compile and run in the IDE.
Anyone have an idea as to what I need to do to make this work? Is there any other info you need?
-
Dec 20th, 2005, 09:56 AM
#2
Re: Failed to load control MSFlexGrid error
Is your Win2K PC still available?
Are you running the same VB service pack on your new machine as you did on your old?
-
Dec 20th, 2005, 10:36 AM
#3
Thread Starter
Frenzied Member
Re: Failed to load control MSFlexGrid error
 Originally Posted by Hack
Is your Win2K PC still available?
Are you running the same VB service pack on your new machine as you did on your old?
Yes to both!
-
Dec 20th, 2005, 10:43 AM
#4
Re: Failed to load control MSFlexGrid error
Go to your old PC and copy that OCX file out to your network.
Go back to your new PC, and replace the existing OCX with the one you just copied.
See if that makes a difference (you will probably have to manually re-register the OCX once the copy has been done.)
-
Dec 21st, 2005, 12:18 PM
#5
Thread Starter
Frenzied Member
Re: Failed to load control MSFlexGrid error
Well, I thought I might not have to set up the old system to get the ocx because I found a copy in a package/support folder for an earlier incarnation of my app. That version used an Access db that was populated with data from the mainframe, but the process required a lot of manual steps. The current version makes a socket connection on the mainframe to a C server that I wrote to fetch the data from a SQL db.
Anyway, it should be the same ocx file, but it still doesn't work. FWIW, I registered the copy in the package/support folder. Does it have to be registered from the System32 folder? I haven't had to do this before so I'm a bit of a noob in this area.
I've been pretty busy with a bunch of other, more important tasks. I'll try to fire up the old system asap and copy the ocx from its System32 folder.
-
Dec 21st, 2005, 12:51 PM
#6
Re: Failed to load control MSFlexGrid error
I could be wrong on this, but I think as long as it is registered with the OS, it doesn't matter where it resides on the hard drive.
-
Dec 22nd, 2005, 04:56 PM
#7
Thread Starter
Frenzied Member
Re: Failed to load control MSFlexGrid error
This problem has officially entered "The Twilight Zone"
Early this morning I was pondering why I could still compile & run the app in the IDE and began to wonder if it was actually compiling since the code hadn't changed in ages. So, I made a small change in Sub Form_Load() that wouldn't affect the result and tried to run it.
It immediately threw the error "Run-time error '500003'; Unexpected error" at the line frmPingChrt.Show in Sub Main(). Clicked 'End' and got another, smaller "Unexpected error" message. Clicked 'Okay' and got the message "Error loading 'C:\DOCUME~1\sysbxs\LOCALS~1\temp\VB2A.tmp". A control could not be loaded due to load error. Continue? [Yes] [No] [Help].
After clicking my way through all the messages and stopping the run, I noticed there was a red square where the flexgrid control had been. The control had been changed to a PictureBox. I restored the flexgrid and tried running the app again - same results.
So I shut down the IDE and looked in C:\Documents and Settings\sysbxs\Local Settings\temp\ to see what was there. No VB2A.tmp, but there is a VB71.tmp. Any idea as to the purpose of these files?
About an hour later, I had some time to start this post so I launched the IDE and ran the app to document the error messages and damn if it didn't run. I checked everything out and found no problems, so I stopped the app and ran it again. This time it failed with the 50003 error, so I documented the messages and shut down the app & IDE. I continued to launch the IDE and run the app with intermittent success. Think I'll go off for a while and look into these .tmp files.
-
Dec 22nd, 2005, 09:41 PM
#8
Re: Failed to load control MSFlexGrid error
You should erase any of those temp file they are not needed after VB has shutdown. You will need to check your SP's for XP and VB. What are your SP levels for both?
-
Dec 23rd, 2005, 09:34 AM
#9
Thread Starter
Frenzied Member
Re: Failed to load control MSFlexGrid error
Here is what I know, so far, about the .tmp files in the Local Settings\Temp folder.
When the IDE is launched, a file with the naming convention ~DFnnnn.tmp (where nnnn is a 4 digit hex number) is created. When I toggle from the code to the form, i.e. clicking the View Object button, a second tmp file is created. This would be the VBnn.tmp files mentioned earlier. FWIW, I noticed that nn incremented in each succeeding file created. VB2A.tmp, VB2B.tmp, etc. Both the ~DFnnnn.tmp and VBnn.tmp files are destroyed when the IDE is closed.
So, this explains why the app would sometimes run and sometimes fail when running in the IDE. It failed whenever I did a View Object. The only way to 'fix' the problem was to close and reopen the IDE. I still don't know the full purpose of the VBnn.tmp files.
Now, if I could just figure out this 372 error.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|