Is there anyway to get the taskbar properties, such as height or autohide properties?

I need to have a particular window flush against the taskbar if it's multiple rows tall or all the way to the bottom of the screen if its set to autohide.

Thanks.