可以配合上一节,获得显示器尺寸,计算任务栏尺寸
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);