Running the Print Screen Tool (Windows CE 5.0)
To run the Print Screen tool on a target device, you must first add support for the Windows CE Test Kit (CETK) to the Windows CE operating system (OS) for the target device. For information about adding support for the CETK to your Windows CE OS, see CETK Setup.
When you add support for the CETK to your Windows CE OS, the Prt_scrn.exe file is copied from %_WINCEROOT%\Others\Wcetk\<CPU> to the release directory for your Windows CE OS.
The following example shows the syntax for the Print Screen tool.
Prt_scrn [–dNUM] [-sNum1Num2] [–eNum1Num2] Filename
Parameters
- -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
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.
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
Send Feedback on this topic to the authors