Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I move the Taskbar with code?

Status
Not open for further replies.

ep1

Programmer
Oct 22, 2003
8
US
I have attempted to find a previous Thread with this question and have failed. Would someone please be kind enough to show me or point me in the right direction to move the Taskbar with code.

Thank you for your time,

EP1
 
The following code will hide the taskbar. As far as moving it, I don't know.

Code:
Option Explicit
Private Declare Function ShowWindow Lib "user32" _
    (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    
Private Declare Function FindWindow Lib "user32" _
    Alias "FindWindowA" (ByVal lpClassName As String, _
    ByVal lpWindowName As String) As Long
    
Private Declare Function FindWindowEx Lib "user32" _
    Alias "FindWindowExA" (ByVal hWnd1 As Long, _
    ByVal hWnd2 As Long, _
    ByVal lpsz1 As String, _
    ByVal lpsz2 As String) As Long



Sub TaskBar(blnValue As Boolean)
    Dim lngHandle As Long
    Dim lngStartButton As Long

    lngHandle = FindWindow("Shell_TrayWnd", "")
    
    If blnValue Then
        ShowWindow lngHandle, 10
        Else
        ShowWindow lngHandle, 0
    End If
End Sub


Maybe it will give you some ideas.


***You can't change your past, but you can change your future***
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top