Results 1 to 2 of 2

Thread: Disabling the Windows taskbar!?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 1999
    Location
    South Africa
    Posts
    22

    Post

    I am currently writing an app which requires that the operator does not have access to the windows taskbar or graphical operating system.

    Could anyone please tell me how to disable the taskbar, or hide it so that the user cannot access it's facilities?

    Thanks a lot


  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Try this:
    Code:
    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 Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    Private Const SW_HIDE = 0
    Private Const SW_SHOW = 5
    
    Private Sub Command1_Click()
        Static bHidden As Boolean
        Dim lHwnd As Long
        bHidden = Not bHidden
        lHwnd = FindWindowEx(0&, 0&, "Shell_TrayWnd", vbNullString)
        Call ShowWindow(lHwnd, IIf(bHidden, SW_HIDE, SW_SHOW))
    End Sub
    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Certified AllExperts Expert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width