CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 1999
    Posts
    13

    Minilaze all windows

    When my application starts, I want to minimaze all applications previously opened by user.
    What API can help my with that?
    P.


  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: Minilaze all windows

    Just an idea .. ok..

    Get the handles of all top level windows, with EnumWindows API. then Post a WM_SIZE message with SIZE_MININISED value for wParam.

    Check if it works.
    This is the technique used usally to close all windows (with WM_CLOSE message)

    RK

  3. #3
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Minilaze all windows

    If you're using VB6, you can use the 'Microsoft Shell Controls and Automation' DLL (set a reference to this DLL through Projects->References, or straight to the file at c:\windowsdirectory\system32\shdoc401.dll)

    You can then use code such as :


    Dim o as Shell32.Shell
    set o = new Shell32.Shell
    '
    o.MinimizeAll
    '
    set o = nothing
    '






    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

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

Featured