Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

For state

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
I am writing a app that i need to tell the user if he or She clicks out side the form??

Hope some one can Help Me

Thanks Stephen rattray
 
Hello

This sounds like fun!!

It is not easy to do what you are asking due to the nature of vb i.e. that it is only directly aware of what is happening in its own app.

There are various ways of doing this through API calls - eg you can get the window handle of your form then using one of the pointer apis you can determine if a mouse event occured within your handle area or not (this has a performance issue as all mouse events will have to be validated).

Ultimately there is no getting away from the complexity of this task - Are you sure you need to do this?
 
if what you want to know is "When does the user clicks outside the form?" so:

if there is only one form, try using the "lost focus" procedure.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top