国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

C# 如何獲取屏幕光標位置

2019-11-17 04:07:44
字體:
來源:轉載
供稿:網友
第一種使用 API 方式

view plaincopy to clipboardPRint?
[DllImport("User32.dll")]   
public static extern int GetCursorPos(out Point point);   
public static Point ScreenCursorPosition   
{   
    get  
    {   
        Point showPoint = new Point();   
        GetCursorPos(out showPoint);   
        return showPoint;   
    }   
}  
[DllImport("User32.dll")]
public static extern int GetCursorPos(out Point point);
public static Point ScreenCursorPosition
{
    get
    {
        Point showPoint = new Point();
        GetCursorPos(out showPoint);
        return showPoint;
    }
}

第二種 .Net 提供的最直接的屬性

view plaincopy to clipboardprint?
System.Windows.Forms.Cursor.Position  
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 韶山市| 鹤岗市| 惠东县| 新竹市| 太保市| 黔西| 自治县| 华坪县| 枝江市| 中超| 高碑店市| 府谷县| 高雄县| 德钦县| 开阳县| 明溪县| 达拉特旗| 云霄县| 霸州市| 德庆县| 桃江县| 屯门区| 长丰县| 施甸县| 山西省| 元谋县| 麦盖提县| 右玉县| 繁峙县| 浙江省| 怀宁县| 南阳市| 道孚县| 壤塘县| 华安县| 上栗县| 景泰县| 仁化县| 青铜峡市| 崇礼县| 兰溪市|