Solved

Mouse click traping

Posted on 2002-04-19
7
165 Views
Last Modified: 2011-09-20
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
Comment
Question by:Azmodan
7 Comments
 
LVL 2

Accepted Solution

by:
corvanderlinden earned 75 total points
Comment Utility
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
 

Author Comment

by:Azmodan
Comment Utility
sure
my email is: rvescan@home.ro

10x
0
 

Author Comment

by:Azmodan
Comment Utility
this is what i was looking for

10x

ps: why have you have - surely not in production code? :)
it's not stable?
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 44

Expert Comment

by:Arthur_Wood
Comment Utility
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
 

Author Comment

by:Azmodan
Comment Utility
sure
but in IE... I am allowed to show only modal forms, and i don't want that
0
 
LVL 2

Expert Comment

by:corvanderlinden
Comment Utility
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
 

Expert Comment

by:smc1979
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now