Get Mouse Cursor Position Inside or Outside Form

Category:
System/API
Type:
Snippets
Difficulty:
Beginning
Author:
Muhammad Javaid

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This code demonstrates how to get the mouse cursor position inside or outside the form anywhere on the screen. To use the code as written, you must add a timer and two label controls to a form.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: