Render external application's window... RRS feed

  • Question

  • I would like to enable a preview of a window belonging to another process from within my application.  Is this possible?  The other process is started from within my application, i.e:

    Process myProc = Process.Start(...);

    Thanks in advance,

    Tuesday, March 24, 2009 3:20 AM

All replies

  • Hi,

    Could you be more specific about the preview?
    If you mean capture the image of the application .

    You might want to see the article which shows how to capture a Window as an Image.

    For the minimized window , please try:

    The article shows how to do it using win32 programming:

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Harry Zhu Monday, March 30, 2009 2:27 AM
    • Unmarked as answer by fyathyrio8 Tuesday, April 7, 2009 5:28 AM
    Thursday, March 26, 2009 1:45 AM
  • The first solution is close to what I'm looking for; however, it forces the window to be restored before it will provide a preview.  I am creating an application that manages multiple instances of other processes (that have windows).  I want to be able to view current previews of the processes within my application (without having to restore the window first).
    Tuesday, April 7, 2009 5:30 AM
  • If there was a way to utilize the way that peak works (in Windows 7), that'd be perfect.  Any ideas?
    Wednesday, April 8, 2009 2:25 PM
  • Keep a List<> of screenshots as you spawn a new process...

    //Now grab the screenshot and add to List<>;
    Looking for "entry level" position...
    Wednesday, April 8, 2009 2:31 PM
  • I was thinking about doing that - the only problem is that it would never update.  I don't think that Process has an event that is thrown when the window is restored or minimized.  I have seen other applications for Vista that show live screenshots (basically the same way as Win + Tab, but in a different form).  It must be possible.
    Thursday, April 9, 2009 12:50 PM
  • If you need updates you will need a system-wide hook to catch the ACTIVATE msgs and redo the screenshot.
    Looking for "entry level" position...
    Thursday, April 9, 2009 4:52 PM
  • Not THAT sounds like a good time.
    Thursday, April 9, 2009 7:24 PM