×

# c# winapi 获取windows工作区尺寸

hqy hqy 发表于2026-04-08 16:55:30 浏览6 评论0

抢沙发发表评论

# c# winapi 获取windows工作区尺寸

可以配合上一节,获得显示器尺寸,计算任务栏尺寸

C#
private const int SPI_GETWORKAREA = 0x0030;[DllImport("user32.dll")]private static extern bool SystemParametersInfo(int uAction, int uParam, out RECT lpRect, int fuWinIni);[StructLayout(LayoutKind.Sequential)]private struct RECT{    public int Left;    public int Top;    public int Right;    public int Bottom;}RECT workAreaRect;SystemParametersInfo(SPI_GETWORKAREA, 0, out workAreaRect, 0);


打赏

本文链接:https://www.kinber.cn/post/6403.html 转载需授权!

分享到:


推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

 您阅读本篇文章共花了: 

群贤毕至

访客