[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.
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