当前位置:首页 > 开发 > C# > 正文内容

获取鼠标坐标位置

C#5年前 (2021-04-19)

方式1

 //获取鼠标光标的位置(以屏幕坐标表示)
    int x = Control.MousePosition.X;    //鼠标x坐标
    int y = Control.MousePosition.Y;    //鼠标y坐标


转载请注明出处。

本文链接:http://pythonopen.com/?id=35

相关文章

C# 获取网页源代码

private static string GetHtml(str...

C# decimal

概述在 C# 中,decimal是一种数据类型,用于表示高精度的十进制数值。它主要用于需要精确计算的...

C# BackgroundWorker,在DoWork里更新控件内容

一般情况下不可以直接在BackgroundWorker的DoWork事件中更新 UI 控件在Back...

C# Byte[]转为Bitmap

在 C# 中,可以使用System.Drawing命名空间下的相关类将byte[]类型的数据转换为B...

C# MemoryStream转为Image

        //...

C# Control防闪烁

SetStyle(ControlStyles.AllPaintingInWmPaint |...