C#显示和隐藏鼠标

   [DllImport("user32", EntryPoint = "ShowCursor")]
        public extern static bool ShowCursor(bool show);
        private void button1_Click(object sender, EventArgs e)
        {
            ShowCursor(false);//隐藏鼠标
        }

        private void button2_Click(object sender, EventArgs e)
        {
            ShowCursor(true);//显示鼠标
        }

 

posted @ 2019-08-10 14:18  袁浩178  阅读(1916)  评论(0编辑  收藏  举报