Results 1 to 2 of 2

Thread: i'd like to...

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441
    Minimize all open apps when my apps starts (I want my app to be excluded from the list).

    Any ideas?
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  2. #2
    Matthew Gates
    Guest
    Code:
    Private Declare Function FindWindow Lib "user32" _
    Alias "FindWindowA" (ByVal lpClassName As String, ByVal _
    lpWindowName As String) As Long
    
    Private Declare Function PostMessage Lib "user32" _
    Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As _
    Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    
    Private Const WM_COMMAND As Long = &H111
    Private Const MIN_ALL As Long = 419
    Private Const MIN_ALL_UNDO As Long = 416
    
    
    Private Sub MinimizeAll()
    
        Dim lngHwnd As Long
           lngHwnd = FindWindow("Shell_TrayWnd", vbNullString)
        Call PostMessage(lngHwnd, WM_COMMAND, MIN_ALL, 0&)
    
    End Sub
    
    Private Sub RestoreAll()
    
        Dim lngHwnd As Long
           lngHwnd = FindWindow("Shell_TrayWnd", vbNullString)
        Call PostMessage(lngHwnd, WM_COMMAND, MIN_ALL_UNDO, 0&)
      
    End Sub
    
    Private Sub Restore(frm As Form)
    
        Dim lngHwnd As Long
           lngHwnd = frm.hWnd
        Call PostMessage(lngHwnd, WM_COMMAND, MIN_ALL_UNDO, 0&)
      
    End Sub

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