GetCursorPos
Point declaration
<System.Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)> _
Public Structure POINT
Public X As Integer
Public Y As Integer
Public Sub New(ByVal X As Integer, ByVal Y As Integer)
Me.X = X
Me.Y = Y
End Sub
End StructureTips & Tricks:
POINT p;
if (GetCursorPos(out p))
{
label1.Text = Convert.ToString(p.X) + ";" + Convert.ToString(p.Y);
}Tips & Tricks:
Alternative Managed API:
Última actualización