<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

posted on 2015-09-04 17:43  lbnnbs  阅读(366)  评论(0编辑  收藏  举报