获取系统任务栏高度

    <DllImport("user32.dll")> _
    Private Shared Function SystemParametersInfo(ByVal uAction As Integer, ByVal uParam As Integer, ByRef lpvParam As Rectangle, ByVal fuWinIni As Integer) As Integer
    End Function
    Public Function GetTaskbarHeight() As Integer
        Dim lRes As Integer
        Dim rectVal As Rectangle
        lRes = SystemParametersInfo(SPI_GETWORKAREA, 0, rectVal, 0)
        Return Screen.PrimaryScreen.Bounds.Height - rectVal.Bottom
    End Function

原文地址:https://www.cnblogs.com/lbnnbs/p/4782064.html