Did the subject get ya to look?

I have seen some references but just cant find any right now. When positioning my form I want it to be on the lowest possible location, but if any taskbar/appbars are there, my form would of course need to be on higher up on the screen.

Here is the code I have right now

Code:
Public Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1



Public Sub CenterForm(formName As Form)

    
    ' Position a form on the screen
    'formName.Top = (Screen.Height - formName.Height)
    MsgBox Screen.Height & vbCrLf & GetSystemMetrics(SM_CYSCREEN) * Screen.TwipsPerPixelY
    formName.Top = ((GetSystemMetrics(SM_CYSCREEN) * Screen.TwipsPerPixelY) - formName.Height)
    formName.Left = 0
    'formName.Width = Screen.Width
    formName.Width = (GetSystemMetrics(SM_CXSCREEN) * Screen.TwipsPerPixelX)

End Sub
But it doesnt account for the taskbar, it puts the form on lowest location possible and since the taskbar is there it goes over my form, ugg, which isnt too cool.

Thanks