Link to home
Start Free TrialLog in
Avatar of Azmodan
Azmodan

asked on

Mouse click traping

I have a modal form. How can I get an event (execute some code) when the user click outside the modal form?
(I want to hide the modal form when the user clicks outside)

Are there some API functions to get mouse events on other forms under the modal form?
A hook maybe? Would a hook (subclassing) work?
ASKER CERTIFIED SOLUTION
Avatar of corvanderlinden
corvanderlinden

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Azmodan
Azmodan

ASKER

sure
my email is: rvescan@home.ro

10x
Avatar of Azmodan

ASKER

this is what i was looking for

10x

ps: why have you have - surely not in production code? :)
it's not stable?
doesn't that COMPLETELY DEFEAT the purpose of a MODAL form.  If you don't want the form to be MODAL, why open it as MODAL, in the first place?

A Modal form is intended to REQUIRE the user to respond to THAT form BEFORE they can do ANYTHING else.  If you then hide the form when they click anywhere else, then the form was not MODAL in the first place.
Avatar of Azmodan

ASKER

sure
but in IE... I am allowed to show only modal forms, and i don't want that
ps: why have you have - surely not in production code? :)^

Subclassing and hooking in VB is always a little risky. Just test a lot and know what you are doing

Good luck
I am looking to do the same thing. By any chance can I get a copy to sent to me?? thanks!

webmaster@croftssoftware.com