亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何使用C#移動鼠標光標?

如何使用C#移動鼠標光標?

C#
海綿寶寶撒 2019-08-31 15:55:49
我想每x秒模擬一次鼠標移動。為此,我將使用一個計時器(x秒),當計時器滴答時,我將使鼠標移動。但是,如何使用C#移動鼠標光標?
查看完整描述

2 回答

?
慕蓋茨4494581

TA貢獻1850條經驗 獲得超11個贊

看看Cursor.Position房產。它應該讓你開始。


private void MoveCursor()

{

   // Set the Current cursor, move the cursor's Position,

   // and set its clipping rectangle to the form. 


   this.Cursor = new Cursor(Cursor.Current.Handle);

   Cursor.Position = new Point(Cursor.Position.X - 50, Cursor.Position.Y - 50);

   Cursor.Clip = new Rectangle(this.Location, this.Size);

}


查看完整回答
反對 回復 2019-08-31
  • 2 回答
  • 0 關注
  • 539 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號