The CancelCapture function stops the current capture started with Mouse.Capture, then calls the Mouse.OnCancelCapture event.
So the Mouse.OnReleaseCapture event is not called.
Syntax
Integer Mouse.CancelCapture()
Parameters
The CancelCapture function has no parameters.
Return value
The CancelCapture function returns true.
If an error occurs, the CancelCapture function returns false.
Example
myMouse.CancelCapture()