[C #] [Windows API] mouse cursor move, hide, get location

[C #] [Windows API] mouse cursor move, hide, get location


Native method declarations used in the following examples refer to [Windows native methods commonly used finishing (Windows API)].


        {
            /// 
            /// 显示或隐藏游标(此效果仅作用于当前处理绪上的所有窗口)。
            /// 
            public static void SetCursorVisiable(Boolean Show)
            {
                NativeMethods.ShowCursor(Show);
            }

            /// 
            /// 取得或设定游标在画面上的座标
            /// 
            public static Point CursorPostion
            {
                get
                {
                    Point Output;
                    NativeMethods.GetCursorPos(out Output);
                    return Output;
                }
                set
                {
                    NativeMethods.SetCursorPos(value.X, value.Y);
                }
            }
        }

share it

Original: Large column  [C #] [Windows API] mouse cursor move, hide, get location


Guess you like

Origin www.cnblogs.com/chinatrump/p/11518105.html