Squall_FF8 0 Posted Monday at 09:51 AM (edited) Hi guys, I have a modal window above my main form. I want to do something when I click outside the modal window. How I can do that? I tried with MouseMove, but it returns <X,Y> as <-1,-1> when the cursor is outside the modal window. Unfortunately that is not enough because, the same values are returned when you try to do things like resize,.. so there is no guarantee that <-1,-1> is what we need. On top of that MouseUp/Down is not even triggered when you click outside. Edited Monday at 10:23 AM by Squall_FF8 more details Share this post Link to post
PeaShooter_OMO 24 Posted Monday at 11:08 AM (edited) Clicking outside the modal form will not register a mouse down, even through TApplicationEvents.OnMessage. I suspect you might have to use Windows System Hooks with WH_MOUSE. I have not done this before though and as such cannot confirm if this would be the most appropriate way to do it. Edited Monday at 12:19 PM by PeaShooter_OMO Share this post Link to post