Results 1 to 6 of 6

Thread: how to capture Active window

  1. #1
    kais
    Guest

    how to capture Active window

    hi guys

    How can i capture an active window. I dont want to use the printscreen concept. I just want the active window to be loaded in to the picture box.

    Is it possible to capture the active window????

    if any of u guys has any idea about, pls let me know

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    There is a GetActiveWindow API (see http://www.allapi.net/) that will return the handle of the active window, but, short of taking a screen shot, I don't see how you would get that into a picture box.

  3. #3
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752
    it should be possible with bitblt function

    U get the windowhandle with GetActiveWindow
    U get the device context with GetDC
    Then u can call BitBlt
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

  4. #4
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752
    u can do this with make that window the topmost..then it's solved..i hope so
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

  5. #5
    kais
    Guest

    Lightbulb HI

    Faisal,
    This doent work if the window size is greater than the screen.
    have any idea how to solve this.....




  6. #6
    Member hgroot's Avatar
    Join Date
    Dec 2001
    Location
    Amsterdam
    Posts
    52

    Lightbulb

    Maybe the graphical content is copied to the clipboard if you simulate an Alt+PrintScrn keystroke event to the window?

    Manually pressing those keys also does this...

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