?
Solved

Detecting when the mouse moves off the form

Posted on 1998-11-09
5
Medium Priority
?
162 Views
Last Modified: 2010-04-30
I'm looking for a way of detecting when the mouse moves off the form, does anyone have any tips?  I've tried using the PeekMessage / TranslateMessage / DispatchMessage method and watched the messages, but if the mouse moves off the form onto the desktop I can't seem to see a message or pattern to let me know that its happened.
0
Comment
Question by:rocca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:mark2150
ID: 1443916
Lost focus on your form should do it.
M

0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1443917
Download the HotTrack sample from the Microsoft Owners side

http://premium.microsoft.com/vbasic/
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 200 total points
ID: 1443918
I can mail you a project that has a tracker class. The tracker class has two event Enter and Leave and a property that is the hwnd.
0
 
LVL 1

Author Comment

by:rocca
ID: 1443919
Thank you very much Mirkwood, that was exactly what I needed!
(mark2150, the LostFocus doesn't trigger on moving the mouse off the form unfortunately, but thank you for replying)
0
 
LVL 1

Author Comment

by:rocca
ID: 1443920
Mirkwood:  Sure that would be great, my email is Peter.Rocca@LHSC.ON.CA - thanks again.
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

762 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