It is very easy to get the position of cursor out side the form\'s boundary by just dragaging the mouse it sends many values to the form when ever the position changes, form
You should use Global Mouse Hook logic to do this.
Global Mouse Hook
Here is a good article that will help you: Processing Global Mouse and Keyboard Hooks in C#