3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by codeorder
0

Here's something to get you started.
I found the following code here, just slightly modified by me to Not Return warnings/errors.

Public Function GetTaskbarLocation() As String
        Dim bounds As Rectangle = Screen.PrimaryScreen.Bounds
        Dim working As Rectangle = Screen.PrimaryScreen.WorkingArea
        If working.Height < bounds.Height And working.Y > 0 Then
            Return "Top"
        ElseIf working.Height < bounds.Height And working.Y = 0 Then
            Return "Bottom"
        ElseIf working.Width < bounds.Width And working.X > 0 Then
            Return "Left"
        ElseIf working.Width < bounds.Width And working.X = 0 Then
            Return "Right"
        Else
            Return Nothing
        End If
    End Function

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        MsgBox(GetTaskbarLocation)
    End Sub

That should get you the location of the TaskBar.
.After you locate the TaskBar, just load a Form in the appropriate location of the Desktop and call it a day.

Hope this helps.

Edited by codeorder: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.