OK, here's the background...
I've been asked to create an 'Outlook-Style' combobox so that users can click the down-button to open the list and then sort on various fields by clicking on a heading label -
So I've built a little Pop-Up form, thrown some code into the Heading labels to sort when clicked on, and all is fine. Upon closing, the Pop-Up then sets the required info in the calling form. Now this 'calling' form (NOT parent, mind!) is actually a subform to a larger form (confused, yet /-)? with a textbox and button sitting beside it to fake the look of a combobox...
The problem I'm banging my head against is to position the form so it opens in the 'right' place to give the impression of a combo. There seems to be no way of getting the exact co-ordinates of the button on the subform with relation to the screen itself - there just isn't a
or
property available to work it out... not even for the containing forms! I've looked at using the API, but hey, guess what, all the Access controls are Lightweight, so no HWND to fire a GetWindowRect call to.
This MUST have happened to someone before - I've tried searching the forums, MSDN and technet without success...
Anyone got any idea's?
I've been asked to create an 'Outlook-Style' combobox so that users can click the down-button to open the list and then sort on various fields by clicking on a heading label -
So I've built a little Pop-Up form, thrown some code into the Heading labels to sort when clicked on, and all is fine. Upon closing, the Pop-Up then sets the required info in the calling form. Now this 'calling' form (NOT parent, mind!) is actually a subform to a larger form (confused, yet /-)? with a textbox and button sitting beside it to fake the look of a combobox...
The problem I'm banging my head against is to position the form so it opens in the 'right' place to give the impression of a combo. There seems to be no way of getting the exact co-ordinates of the button on the subform with relation to the screen itself - there just isn't a
Code:
TOP
Code:
LEFT
This MUST have happened to someone before - I've tried searching the forums, MSDN and technet without success...
Anyone got any idea's?