Detect and Move Taskbar in VB.NET???

  • Thread starter Thread starter JaimeM26
  • Start date Start date
J

JaimeM26

Does anyone know how to detect and move/resize the Taskbar in VB.NET?
I am able to determine if it is on the top or bottom by comparing the
following 2 items.

System.Windows.Forms.Screen.PrimaryScreen.Bounds()
and
System.Windows.Forms.Screen.PrimaryScreen.WorkingArea


But i am having trouble moving the task bar back to its default
location at the bottom of the screen. I am currently running at 1024 X
768 resolution so i am doing the following to determine where it is
located.

size = System.Windows.Forms.Screen.PrimaryScreen.Bounds()

If size.Height >= 768 And size.Width >= 1024 Then
Dim screen As System.Windows.Forms.Screen =
System.Windows.Forms.Screen.PrimaryScreen

Dim workArea As System.Drawing.Rectangle

workArea = screen.WorkingArea

If workArea.Height >= "734" And workArea.Width >= "1024"
Then

' Taskbar is either on the top or the bottom

Else
' The taskbar is on the left or the right.
End If
End If


Any help would be appreciated.
 
Back
Top