Results 1 to 7 of 7

Thread: [RESOLVED] Reloading missing components in old project

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Resolved [RESOLVED] Reloading missing components in old project

    Hi,

    I have a project that I haven't looked at for years and need to modify and need some help getting it working.

    On opening it I've found that I needed to reload Microsoft Windows Common Controls-2 component.
    After doing that the next error is that my toolbar control is just a picturebox and I get a compile error saying Method or data member not found.

    Is there any way of getting the original toolbar working again?

  2. #2
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    868

    Re: Reloading missing components in old project

    Quote Originally Posted by sgrya1 View Post
    After doing that the next error is that my toolbar control is just a picturebox and I get a compile error saying Method or data member not found.
    Could you post a screenshot, and a code snippet showing where the app throws the error

    Spoo

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Reloading missing components in old project

    Name:  2017-10-27_122929.jpg
Views: 757
Size:  50.1 KB

    This is the line that is throwing the error:
    Code:
    MDI.tbToolBar.Buttons("RCPerims").Value = 1
    I guess without the components included when I open the project these controls are converted to PictureBoxes. I don't know how to add the components before opening the project.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Reloading missing components in old project

    When I load the project I get an error saying "Errors during load. Refer ...MDIForm1.log for details"

    Line 40: Class MSComctlLib.ImageList of control imlToolbarIcons was not a loaded control class.
    Line 86: Class MSComctlLib.Toolbar of control tbToolBar was not a loaded control class.
    Line 43: The property name _ExtentX in imlToolbarIcons is invalid.
    Line 44: The property name _ExtentY in imlToolbarIcons is invalid.
    Line 46: The property name ImageWidth in imlToolbarIcons is invalid.
    Line 47: The property name ImageHeight in imlToolbarIcons is invalid.
    Line 48: The property name MaskColor in imlToolbarIcons is invalid.
    Line 49: The property name _Version in imlToolbarIcons is invalid.
    Line 84: The property name Images in imlToolbarIcons is invalid.
    Line 93: The property name _ExtentX in tbToolBar is invalid.
    Line 94: The property name _ExtentY in tbToolBar is invalid.
    Line 95: The property name ButtonWidth in tbToolBar is invalid.
    Line 96: The property name ButtonHeight in tbToolBar is invalid.
    Line 98: The property name ImageList in tbToolBar is invalid.
    Line 99: The property name _Version in tbToolBar is invalid.
    Line 148: The property name Buttons in tbToolBar is invalid.

    The component is possibly registered but using a different name?
    I don't really know what I'm talking about. Just taking wild guesses.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Reloading missing components in old project

    I worked it out after a bit of searching.

    I created a fresh VB project, added the missing components and saved it.
    I opened the project's .vbp file and copied the missing component references into my project's .vbp file.

    Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
    Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; mscomct2.ocx

  6. #6
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,598

    Re: [RESOLVED] Reloading missing components in old project

    You made the mistake of saving the project when it couldn't find the components.
    When I see that error I definitely don't save the project as I don't want to loose those references, but as you found it is easy enough to add them back manually.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: [RESOLVED] Reloading missing components in old project

    I did save it, came to that realization and then there was a panic search for a backup.
    Luckily still had one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width