Determining position of horizontal scroll bar in a listbox
Posted on 2004-10-25
I am trying to create an ActiveX component consisting of two listboxes. I need to be trap the position of the horizontal scrollbar in one of the listboxes so as to be able to then set the position of the horizontal scrollbar in the second listbox to match.
I have code which subclsses and traps the horizontal scroll bar event in the first listbox, but how can I determine its position and then update the position of the scrollbar in the second listbox?
I have been looking at GetScrollinfo / SetScrollinfo Win API calls, but simply including the declaration statements in the userControl seems to cause a VB 6.0 GPF fault - blows away VB6.0 environment!
Any assistance would be greatly appreciated.
Best regards, Dave Melnyk, Toronto