The taskbar can be dragged to any position on the screen (one of the top, bottom, and left), and the size of the taskbar varies with the screen resolution.
The followingCodeUsed to obtain the size and position of the taskbar:
''' <Summary> <br/> ''' taskbar <br/> ''' </Summary> <br/> ''' <remarks> </remarks> <br/> Public structure taskbar </P> <p> Public bounds as rectangle </P> <p> Public directionf as direction </P> <p> Public Enum direction <br /> bottom = 0 <br/> left = 1 <br/> Top = 2 <br/> right = 3 <br/> end Enum </P> <p> end structure </P> <p> Public Function gettaskbarrect () as taskbar </P> <p> dim tadkbararea as new taskbar 'taskbar area <br/> dim workingarea as rectangle = screen. getworkingarea (new point (0, 0) 'working area <br/> dim screenarea as rectangle = screen. getbounds (new point (0, 0) 'main screen area </P> <p> 'determines the position in the upper left corner to determine the direction of the taskbar <br/> with workingarea. location <br/> If. X = 0 andalso. y = 0 andalso workingarea. width = screenarea. width then <br/> tadkbararea. directionf = taskbar. direction. bottom </P> <p> tadkbararea. bounds. X = 0 <br/> tadkbararea. bounds. y = workingarea. height <br/> tadkbararea. bounds. width = workingarea. width <br/> tadkbararea. bounds. height = screenarea. height-workingarea. height <br/> elseif. x> 0 then <br/> tadkbararea. directionf = taskbar. direction. left </P> <p> tadkbararea. bounds. X = 0 <br/> tadkbararea. bounds. y = 0 <br/> tadkbararea. bounds. width = screenarea. width-workingarea. width <br/> tadkbararea. bounds. height = workingarea. height <br/> elseif. X = 0 andalso. y> 0 then <br/> tadkbararea. directionf = taskbar. direction. top </P> <p> tadkbararea. bounds. X = 0 <br/> tadkbararea. bounds. y = 0 <br/> tadkbararea. bounds. width = workingarea. width <br/> tadkbararea. bounds. height = screenarea. height-workingarea. height <br/> elseif. X = 0 andalso. y = 0 andalso workingarea. height = screenarea. height then <br/> tadkbararea. directionf = taskbar. direction. right </P> <p> tadkbararea. bounds. X = workingarea. right <br/> tadkbararea. bounds. y = 0 <br/> tadkbararea. bounds. width = workingarea. width <br/> tadkbararea. bounds. height = workingarea. height <br/> end if <br/> end with </P> <p> return tadkbararea </P> <p> end function <br/>