다음을 통해 공유


Print Screen Tool (Windows Embedded CE 6.0)

1/6/2010

On a Windows Embedded CE–based device, the Print Screen tool (Prt_scrn.exe) takes a screen shot and saves the screen shot as a bitmap (.bmp) file on the target device. The Print Screen tool supports all color depths.

The Print Screen tool is a command-line tool that does not require Platform Manager. If you have established a Platform Manager connection to a target device, you can instead use the Remote Zoom-in tool to take a screen shot. The Remote Zoom-in tool provides a graphical user interface (GUI). For information about the Remote Zoom-in tool, see Zoom.

With the Print Screen tool, you can take a screen shot of a rectangular portion of the screen that is smaller than the full screen. The sides of the rectangular portion must be parallel to the horizontal and vertical sides of the display. You define the rectangle by specifying the coordinates of the upper left vertex and the lower right vertex.

Running the Print Screen Tool

To run the Print Screen tool on a target device, you must first add support for the Windows Embedded CE 6.0 Test Kit (CETK) to the Windows Embedded CE operating system (OS) for the target device. For information about adding support for the CETK to your Windows Embedded CE OS, see CETK Setup.

When you add support for the CETK to your Windows Embedded CE OS, the Prt_scrn.exe file is copied from %_WINCEROOT%\Others\Wcetk\<CPU> to the release directory for your Windows Embedded CE OS.

Syntax of the Print Screen Tool

Prt_scrn [–dNUM] [-sNum1Num2] [–eNum1Num2] filename

Parameters of the Print Screen Tool

  • -dNUM
    Specifies a number of seconds NUM to wait after running the Prt_scrn.exe application before taking the screen shot. The default value for NUM is zero.
  • -sNum1Num2
    Specifies the location of the upper left vertex of the rectangular region on the screen where to take the screen shot. The values Num1 and Num2 specify, in pixels, the horizontal and vertical coordinates, respectively, of this vertex. The default values for Num1 and Num2 are zero. The default values specify that the upper left vertex is the upper left corner of the screen.
  • -eNum1Num2
    Specifies the location of the lower right vertex of the rectangular region on the screen where to take the screen shot. The values Num1 and Num2 specify, in pixels, the horizontal and vertical coordinates, respectively, of this vertex. The values for Num1 and Num2 must be greater than the values specified in the -s parameter. The default value for Num1 is the width of the screen in pixels minus one pixel and the default value for Num2 is the height of the screen in pixels minus one pixel. The default values specify that the lower right vertex is the lower right corner of the screen.
  • filename
    Specifies the path and file name of the .bmp file where to save the screen shot. To save the .bmp file to the release directory, add a \release\ prefix to the file name. The filename parameter is a required parameter.

Examples

The following code example shows syntax that instructs the Print Screen tool to take a screen shot on the target device three seconds after running Prt_scrn.exe. This example sends the screen shot to the Snapshot.bmp file in the release directory.

Prt_scrn –d 3 \Release\Snapshot.bmp

The following code example shows syntax that instructs the Print Screen tool to take a screen shot of the (100, 100, 400, 400) screen region on the target device. This example sends the screen shot to the Snapshot.bmp file in the Windows directory on the target device.

Prt_scrn –s 100 100 –e 400 400 \Windows\Snapshot.bmp

To run the Print Screen tool

  1. Connect the target device to the CETK.

    For information about connecting a target device to the CETK, see Configuring the CETK to Communicate with a Target Device.

  2. On the target device, run the Prt_scrn command with your choice of parameters.

    - or -

    If Platform Builder is running and connected to the target device, from the Build OS menu, choose Open Release Directory. At the prompt, type Prt_scrn and then type your choice of parameters.

    - or -

    From the Target menu, choose Run Programs. From the Available Programs list, select prt_scrn.exe. In the Execution command line box, type your choice of parameters, and then choose Run.

See Also

Other Resources

Tools for Testing from the CETK