Error 1 Argument not specified for parameter 'p' of 'Public Function PointToClient(p As System.Drawing.Point) As System.Drawing.Point'.
No, that is not correct, try it and you will see why. (for example compare with the client coordinate provided by MouseMove event)You could have solved your problem LONG time ago if you simply subtract the cursor x and y from the form x and y.
PointToClient is a single purpose method and it has no options, but since it is a Control instance method it is quite flexible to what context it can be used. For example, what if you want the client coordinate for a picturebox in a panel in a form (and only has the screen coordinate) ? Simply call pb.PointToClient.and I'm sure that it gives more options...
No, that is not correct, try it and you will see why. (for example compare with the client coordinate provided by MouseMove event)
X = mX - fX
Y = mY - fY
If (X < 0) OR _
(Y < 0) OR _
(X > Form.Size.Width) OR _
(Y > Form.Size.Height) Then
Debug.Print("Mouse is outside form")
Else
Debug.Print("Mouse position is " & X & " pixels horizontal and " & Y & " pixels vertical from the window")
End If