Results 1 to 5 of 5

Thread: Windows Start Button/Status Bar

  1. #1
    Guest
    Or you can simply, hide the taskbar .

    Code:
    Declare Function findwindow Lib "user32" _
    Alias "FindWindowA" (ByVal lpClassName As String, ByVal _
    lpWindowName As String) As Long
    
    Declare Function showWindow Lib "user32" Alias "ShowWindow" _
    (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    
    Public Const SW_HIDE = 0
    Public Const SW_SHOW = 5
    
    Dim tray&
    Dim shtray& 
    
    Private Sub Command1_Click()
    'hide
    tray& = findwindow("Shell_TrayWnd", vbNullString)
    shtray& = showwindow(tray&, SW_HIDE)
    End Sub
    
    Private Sub Command2_Click()
    'Show
    tray& = findwindow("Shell_TrayWnd", vbNullString)
    shtray& = showwindow(tray&, SW_SHOW)
    End Sub

  2. #2

    Lightbulb Ok Cool.....BUt???

    Can you Disable All Functions untill the "Program is Done?"

    Like Say I make a Password Protection App. So when Windows start its loads This App first, An nothing else is Click able Until the User Loggs In???

    I know how to disable Keys, Like "CTRL ALT DELETE", "CTRL ESC", "ALT TAB". There is one I dont know "ATL F4". if you know that, Let me know.. Thanks!



    "Never Play Leap Frog With a Unicorn!"

  3. #3
    Junior Member
    Join Date
    Nov 2000
    Location
    India
    Posts
    16

    Re: Ok Cool.....BUt???

    Originally posted by cfreiling
    Can you Disable All Functions untill the "Program is Done?"

    Like Say I make a Password Protection App. So when Windows start its loads This App first, An nothing else is Click able Until the User Loggs In???

    I know how to disable Keys, Like "CTRL ALT DELETE", "CTRL ESC", "ALT TAB". There is one I dont know "ATL F4". if you know that, Let me know.. Thanks!



    "Never Play Leap Frog With a Unicorn!"
    Please try this one in case of MDI Form.

    Select Case UnloadMode
    Case 0
    '.......
    Cancel = 1
    End Select

  4. #4
    Guest
    For ALT+F4, in your other thread, Joacim Andersson had a good code which works much better than if it were put in the Form_QueryUnload event.

    Code:
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As _
     Integer)
        'prevent the ALT+F4 keystokes
        If Shift = vbAltMask And KeyCode = vbKeyF4 Then
            KeyCode = 0
        End If
    End Sub
    Don't know if you can disable certain things. But you can hide/show just the start button if you want.


    Code:
    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 Declare Function ShowWindow Lib "user32" (ByVal _
    hwnd As Long, ByVal nCmdShow As Long) As Long
    
    Const SW_HIDE = 0
    Const SW_SHOW = 5
    
    Dim shelltraywnd&
    Dim shbutton&
    Dim button&
    
    Private Sub Command1_Click()
    shelltraywnd& = FindWindow("shell_traywnd", vbNullString)
    button& = FindWindowEx(shelltraywnd&, 0&, "button", _
    vbNullString)
    shbutton& = ShowWindow(button&, SW_HIDE)
    End Sub
    
    Private Sub Command2_Click()
    shelltraywnd& = FindWindow("shell_traywnd", vbNullString)
    button& = FindWindowEx(shelltraywnd&, 0&, "button", _
    vbNullString)
    shbutton& = ShowWindow(button&, SW_SHOW)
    End Sub

  5. #5
    Lively Member
    Join Date
    Feb 1999
    Location
    Austin,TX,USA
    Posts
    98

    Hey Matthew!

    I don't want to hide the Taskbar completely-just 1 application IN the taskbar. I'm calling an Access2000 database to show the reports from my VB project-is there a way I can HIDE the Access application from showing in the Taskbar so the user won't be tempted to PLAY with it. All I want the user to be able to do is view the reports & then return to the VB program-if they can't see Access in the taskbar they won't be tempted to fool around with it.

    Setting Access Visible=False in VB only MINIMIZES the app-it doesn't delete the Taskbar icon/button. Any ideas? I figure I'll have to use API calls to find the specific app's taskbar button & then hide it? Thanks for ANY help you can give!

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