View Poll Results: please help me

Voters
0. You may not vote on this poll
  • vbcode

    0 0%
  • vbcode

    0 0%
Results 1 to 6 of 6

Thread: please help me

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    India
    Posts
    3

    Question

    I need to hide the taskbar with API when i run any form
    and unhide the taskbar when i close or unload the form

  2. #2
    Guest
    Use the FindWindow API function to find the taskbar, and the ShowWindow API function to show or hide it.


    Code:
    Private Declare Function FindWindow Lib "user32" _
    Alias "FindWindowA" (ByVal lpClassName As String, _
    ByVal lpWindowName As String) As Long
    
    Private Declare Function ShowWindow Lib "user32" _
    Alias "ShowWindow" (ByVal hwnd As Long, ByVal _
    nCmdShow As Long) As Long
    
    Private Const SW_HIDE = 0
    Private Const SW_SHOW = 5
    
    Dim tray&
    Dim shtray& 
    
    
    Private Sub Form_Load()
        tray& = FindWindow ("Shell_TrayWnd", vbNullString)
        shtray& = ShowWindow(tray&, SW_HIDE)
    End Sub
    
    Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
        tray& = FindWindow("Shell_TrayWnd", vbNullString)
        shtray& = ShowWindow(tray&, SW_SHOW)
    End Sub

  3. #3
    Lively Member
    Join Date
    Jun 2000
    Posts
    124

    Question Shell_TrayWnd

    How did you find out the class name (if that's the right term) was Shell_TrayWnd?
    On Error Resume Screaming...

  4. #4
    Guest
    I used a API/Window's Spy.

  5. #5
    Guest
    Use Spy++, which is shipped with Visual Studio.

  6. #6
    Lively Member
    Join Date
    Jun 2000
    Posts
    124

    Unhappy Spy++

    I don't have Spy++, I think it's because I didn't get the full Visual Studios. I only got the VB6 portion of it.
    On Error Resume Screaming...

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