WPF active windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • imbirek8

    WPF active windows

    Hi,

    I would like to write aplication in WPF, and I would like to list all opened
    windows in the system, get the headers of the windows and get the active
    window. How to do it ?
    Is any event, that I can handle, with tell me, that active window is changed
    ?

    Thanks for help

  • Martin Honnen

    #2
    Re: WPF active windows

    imbirek8 wrote:
    I would like to write aplication in WPF, and I would like to list all
    opened windows in the system, get the headers of the windows and get the
    active window. How to do it ?
    Is any event, that I can handle, with tell me, that active window is
    changed ?
    You can enumerate the windows of an application using the property named
    Windows of an Application instance object:



    --

    Martin Honnen --- MVP XML

    Comment

    • imbirek8

      #3
      Re: WPF active windows

      "Martin Honnen" <mahotrash@yaho o.dewrote in message
      news:eQhT3l5LJH A.5648@TK2MSFTN GP05.phx.gbl...
      imbirek8 wrote:
      >
      >I would like to write aplication in WPF, and I would like to list all
      >opened windows in the system, get the headers of the windows and get the
      >active window. How to do it ?
      >Is any event, that I can handle, with tell me, that active window is
      >changed ?
      >
      You can enumerate the windows of an application using the property named
      Windows of an Application instance object:
      http://msdn.microsoft.com/en-us/libr...n.windows.aspx
      But I would like to enumerate windows from the system, like firefox,
      thinderbird, VisualStudio etc.

      Comment

      • Peter Duniho

        #4
        Re: WPF active windows

        rOn Thu, 16 Oct 2008 07:44:47 -0700, imbirek8 <imbirek8@op.pl wrote:
        But I would like to enumerate windows from the system, like firefox,
        thinderbird, VisualStudio etc.
        I don't think .NET includes that functionality. You'll have to use the
        unmanaged Windows API via p/invoke.

        See functions like EnumWindows(), GetWindow(), and FindWindow().

        Pete

        Comment

        Working...