Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Problem with mscomctl.ocx

I'm having a problem with a VB6(SP5) project group. Sometimes when I load the group I get an error as some forms are loading. When I open the forms that threw the errors, every ImageList, ListView, TreeView, Toolbar, and every other control that uses mscomctl.ocx are PictureBoxes!

When I open the Components menu and try to select Common Controls, I get an error saying that the name is in conflict with another project, file, etc.
The log files contain messages similar to the following:

Class MSComctlLib.ListView of control lvwCommon was not a loaded control class.

I've tried rebuilding the affected projects and copying them over the old ones. The errors occur again after a few builds. Sometimes I can place the common controls on the form but can't declare variables of types contained in mscomctlLib (such as MscomctlLib.Button).

I've tried reinstalling VB6 several times, but this didn't fix the problem--in fact, after one reinstall a project somehow lost a reference to the common dialog control.

I'm running VB6 on a brand-new Win98 machine with very little software installed on it, so I don't think it's a conflict. The project builds and runs just fine on other Win98 machines. Has anyone out there had or heard of problems like this? I'd appreciate any input.
Thank you!

Anthony Spears

Comments

  • AndyJWAndyJW Posts: 88Member
    : I'm having a problem with a VB6(SP5) project group. Sometimes when I load the group I get an error as some forms are loading. When I open the forms that threw the errors, every ImageList, ListView, TreeView, Toolbar, and every other control that uses mscomctl.ocx are PictureBoxes!
    :
    : When I open the Components menu and try to select Common Controls, I get an error saying that the name is in conflict with another project, file, etc.
    : The log files contain messages similar to the following:
    :
    : Class MSComctlLib.ListView of control lvwCommon was not a loaded control class.
    :
    : I've tried rebuilding the affected projects and copying them over the old ones. The errors occur again after a few builds. Sometimes I can place the common controls on the form but can't declare variables of types contained in mscomctlLib (such as MscomctlLib.Button).
    :
    : I've tried reinstalling VB6 several times, but this didn't fix the problem--in fact, after one reinstall a project somehow lost a reference to the common dialog control.
    :
    : I'm running VB6 on a brand-new Win98 machine with very little software installed on it, so I don't think it's a conflict. The project builds and runs just fine on other Win98 machines. Has anyone out there had or heard of problems like this? I'd appreciate any input.
    : Thank you!
    :
    : Anthony Spears
    :
    Yes, I have seen this before; I see it when migrating VB3/4 app's to VB6. In fact, everything you describe above occurrs when doing this type of work. What VB6 is telling you is that the controls that you used in the earlier versions are no longer viable in the current version and it places a Picture Box on the form to remind you that there was a control there originally. The log tells you what these controls were.

    The cure for this is to replace the defunct controls with the newer VB6 versions (eg mscomm.vbx to mscomm32.ocx) and check the code references in the program.

    Now, from what I understand your message is saying, this is not exactly the problem. I assume that the originals were constructed in VB6 and you are still getting these errors. If this is the case then you indeed have a problem.

    Taking my scenario into account, it would seem that your VB6 can't find the controls that it was using originally - have they moved? They should all be in the System directory. VB is very precise about where these controls should exist in the directory structure, that is why we must be careful when including them for distribution. What is happening on your computer is that VB cannot 'see' the controls it needs to load the app.

    I think that this may only be the tip of the proverbial iceberg but I hope that it helps. If you manage to get things tidied up and it still doesn't work, I wouldn't reload VB - to take it off a system in the first place is very difficult as VB includes files that are very similar to Windows' system files.

    Andy.

  • MalcolmMalcolm Posts: 828Member
    : I'm having a problem with a VB6(SP5) project group. Sometimes when I load the group I get an error as some forms are loading. When I open the forms that threw the errors, every ImageList, ListView, TreeView, Toolbar, and every other control that uses mscomctl.ocx are PictureBoxes!
    :
    : When I open the Components menu and try to select Common Controls, I get an error saying that the name is in conflict with another project, file, etc.
    : The log files contain messages similar to the following:
    :
    : Class MSComctlLib.ListView of control lvwCommon was not a loaded control class.
    :
    : I've tried rebuilding the affected projects and copying them over the old ones. The errors occur again after a few builds. Sometimes I can place the common controls on the form but can't declare variables of types contained in mscomctlLib (such as MscomctlLib.Button).
    :


    : I've tried reinstalling VB6 several times, but this didn't fix the problem--in fact, after one reinstall a project somehow lost a reference to the common dialog control.
    :
    : I'm running VB6 on a brand-new Win98 machine with very little software installed on it, so I don't think it's a conflict. The project builds and runs just fine on other Win98 machines. Has anyone out there had or heard of problems like this? I'd appreciate any input.
    : Thank you!
    :
    : Anthony Spears
    :

    Possibly the Control name or similar conflicts with an existing form name, module name, class name etc. Check that none of the names of forms, modules, or classes don't have a name that could conflict.

    This doesn't sound as though it is the likely cause, given that your not having the trouble everytime you load the project/group.

    If you want, you can send the project or group, and any related files to me at kerwinm@telpacific.com.au and I'll see if I can come up with a solution.

  • Anthony SpearsAnthony Spears Posts: 8Member
    Thanks for the quick response. I've been working on the problem through the weekend and I think I've got it pretty much licked. Two things seemed to fix the problem:
    1) I replaced Office 2000 with Office 97. Some projects use objects from Word 97 and Access 97 databases. This seems to foreshadow problems my code will have when running with Office 2000 :(
    2) I reregistered every .DLL and .OCX in every project.
    After doing those two things everything seemed to work fine. I'll have to look into the Office 2000 problem.

    Thanks,
    Anthony Spears


  • ibholaibhola Posts: 1Member
    Another fix is to re-install the VB6 SP3

    : Thanks for the quick response. I've been working on the problem
    : through the weekend and I think I've got it pretty much licked. Two
    : things seemed to fix the problem:
    : 1) I replaced Office 2000 with Office 97. Some projects use
    : objects from Word 97 and Access 97 databases. This seems to
    : foreshadow problems my code will have when running with Office 2000
    : :(
    : 2) I reregistered every .DLL and .OCX in every project.
    : After doing those two things everything seemed to work fine. I'll
    : have to look into the Office 2000 problem.
    :
    : Thanks,
    : Anthony Spears
    :
    :
    :

Sign In or Register to comment.