[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

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?
0
Azmodan
Asked:
Azmodan
1 Solution
 
corvanderlindenCommented:
There is a system wide mouse hook. Never used it myself (and surely not in production code), but I've got sample code if you're interested, but then I need your email
0
 
AzmodanAuthor Commented:
sure
my email is: rvescan@home.ro

10x
0
 
AzmodanAuthor Commented:
this is what i was looking for

10x

ps: why have you have - surely not in production code? :)
it's not stable?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Arthur_WoodCommented:
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.
0
 
AzmodanAuthor Commented:
sure
but in IE... I am allowed to show only modal forms, and i don't want that
0
 
corvanderlindenCommented:
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
0
 
smc1979Commented:
I am looking to do the same thing. By any chance can I get a copy to sent to me?? thanks!

webmaster@croftssoftware.com
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now