CodeItBetter Programming Another VB Programming Blog

How to Show/Hide the Start Button from the task bar

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'System & API - How to Show/Hide the Start Button from the task bar
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
Private Const BUT_SHOW = 5
Private Const BUT_HIDE = 0
 
Public Sub HideStartButton(ByVal bHide As Boolean)
    Dim Butttonhwnd As Long
    Butttonhwnd = FindWindow("Shell_TrayWnd", "")
    Butttonhwnd = FindWindowEx(Butttonhwnd, 0, "Button", vbNullString)
    If bHide Then
        ShowWindow Butttonhwnd, BUT_HIDE   'To Hide
    Else
        'To show the Start Button
        ShowWindow Butttonhwnd, BUT_SHOW  'To Show
    End If
End Sub

Related posts:

  1. How to Show/Hide your SystemTray
  2. How to Show/Hide all Desktop Icons
  3. _-Start Owner-_ Change the Text Of Your Start Button!
  4. How to Hide/Show the Title bar at Run-Time
  5. How to add a Document name to the Recent Documents list (under Start Button)
  6. How to Show Taskbar
  7. How to open a folder in explorer in particular folder view
  8. How to clear Documents List (under the Start button)
  9. How to Hide Taskbar
  10. How to keep your form always on bottom

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.