Results 1 to 2 of 2

Thread: [RESOLVED] OCX Related - Property Returning Incorrect Value

  1. #1

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Resolved [RESOLVED] OCX Related - Property Returning Incorrect Value

    I'm playing with the CoolBar control (common controls-3).

    When I apply an image list (common controls v5 or v6) to the Coolbar and query that property at Form_Load, then Nothing is returned, not the assigned ImageList. Other properties return their correct settings.

    However, if I precede that with a DoEvents, then property returns the correct setting.

    Any COM gurus have an idea how to get the control to return the correct value without using DoEvents? DoEvents does work, but I'd prefer to not use it for other reasons.

    FYI: This question is related to per-monitor DPI awareness routines I am building.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  2. #2

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: OCX Related - Property Returning Incorrect Value

    Hmmm, found a suitable workaround. Reassigning the imagelist in Form_Load does the trick and since it's the same image list, image indexes assigned in design-time property window are not lost
    Code:
    Set CoolBar1.ImageList = ImageList1
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

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