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

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

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

2019-11-17 04:08:26
字體:
來源:轉載
供稿:網友
第一種使用 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  
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 遵义市| 隆昌县| 大安市| 罗江县| 道真| 盘山县| 霸州市| 临澧县| 汶上县| 缙云县| 林西县| 固镇县| 阳山县| 都安| 德化县| 香河县| 荃湾区| 宁武县| 顺昌县| 翁牛特旗| 徐汇区| 宁城县| 前郭尔| 静宁县| 洪雅县| 合山市| 灵璧县| 望谟县| 调兵山市| 长岭县| 彭州市| 双鸭山市| 兴义市| 根河市| 安阳县| 隆昌县| 金寨县| 望奎县| 三原县| 理塘县| 新乐市|