调用WindowsApi,在Textbox的MouseDown事件中使用HideCaret函数隐藏光标。


        [DllImport("user32.dll")]
        private static extern bool GetCaretPos(out Point ppt);
        [DllImport("user32.dll")]
        private static extern bool HideCaret(IntPtr hWnd);

你可能感兴趣的:(user,textbox)