Thread: What is the code to capture the screen?

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    11

    What is the code to capture the screen?

    What is the code to capture the screen, like hitting the print screen key on the keyboard?
    Batch file code would also be appreciated.
    I am using Dev C++ compiler if that is important.

    Thanks for the help

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    Unfortanetly, it's not as easy as a single call.

    Here is a reference on how to do it http://www.codeproject.com/dialog/screencap.asp

    As it says, the GDI way is very easy, given performance isn't of the essence

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Code:
    while( screen.notnoticing( me ) )
    {
        me.sneakupon( screen );
        if( me.range( screen ) == close )
            me.capture( screen );
    }
    You really have to sneak up on them.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Screen Capture to Bitmap
    By ldb88 in forum Windows Programming
    Replies: 2
    Last Post: 09-20-2007, 11:46 AM
  2. Render text
    By Livijn in forum C++ Programming
    Replies: 6
    Last Post: 07-06-2007, 03:32 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Windows Programming
    Replies: 0
    Last Post: 10-14-2002, 01:29 PM