tvanstiphout
Active member
- Local time
- Today, 08:11
- Joined
- Jan 22, 2016
- Messages
- 359
I'm writing a tool window, a filter form for Continuous Forms, similar to what MSFT implemented for Datasheet (the downward pointing triangle).
If you use that feature in Datasheet, and you click outside of it, it disappears.
Of course MSFT's version is not an Access form, but something fancy that is not easily reproducible. So I am using an Access form with Popup=Yes. Of course Modal=No.
When we click outside a Popup form, it does not raise any events in the popup, not Form_LostFocus, not Form_Deactivate.
I’m thinking I will have to resort to form subclassing (which I am willing to do) but I’m not sure what APIs could be used to detect we are clicking outside the popup. Maybe inspect all mouse clicks for x,y outside of the popup’s area? Maybe the NCHITTEST event?

If you use that feature in Datasheet, and you click outside of it, it disappears.
Of course MSFT's version is not an Access form, but something fancy that is not easily reproducible. So I am using an Access form with Popup=Yes. Of course Modal=No.
When we click outside a Popup form, it does not raise any events in the popup, not Form_LostFocus, not Form_Deactivate.
I’m thinking I will have to resort to form subclassing (which I am willing to do) but I’m not sure what APIs could be used to detect we are clicking outside the popup. Maybe inspect all mouse clicks for x,y outside of the popup’s area? Maybe the NCHITTEST event?
