[C#][Windows API] Mouse cursor move, hide, get position
For the native method declarations used in the following examples, please refer to [Common Windows Native Methods Organizing (Windows API)].
{
////// Show or hide the cursor (this effect only applies to all windows on the current processing thread). ///
public static void SetCursorVisiable(Boolean Show)
{
NativeMethods.ShowCursor(Show);
}
////// Get or set the coordinates of the cursor on the screen ///
public static Point CursorPostion
{
get
{
Point Output;
NativeMethods.GetCursorPos(out Output);
return Output;
}
set
{
NativeMethods.SetCursorPos(value.X, value.Y);
}
}
}
Share
Original text: Large column [C#][Windows API] Mouse cursor move, hide, get position< /p>