Screen screen = Screen.PrimaryScreen;
int a = screen.Bounds.Width ; //宽
int b = screen.Bounds.Height; //高比如我的显示器,计算完的结果是1024和768,单位为像素。像素与毫米的转换根据显示器的不同而不同。
参考:
http://topic.csdn.net/t/20041025/00/3486895.html
int a = screen.Bounds.Width ; //宽
int b = screen.Bounds.Height; //高比如我的显示器,计算完的结果是1024和768,单位为像素。像素与毫米的转换根据显示器的不同而不同。
参考:
http://topic.csdn.net/t/20041025/00/3486895.html
{
if (AGraphic == null) return PointF.Empty;
APoint.X *= AGraphic.DpiX / 25.4f;
APoint.Y *= AGraphic.DpiY / 25.4f;
return APoint;
}Console.WriteLine(MMConv(Graphics.FromHwnd(Handle), new Point(100, 100)));