1 /********************************************************
2 This sample takes a screenshot of the
3 desktop and saves it to a bitmap file.
4 ********************************************************/
7 class ShotApp : GuiApplication
13 SwitchMode(false, null, 0,0,0, null, false);
14 desktop.Grab(bitmap, null, false);
15 for(c = 0; c<1000; c++)
17 char fileName[MAX_LOCATION];
18 sprintf(fileName, "shot%02d.png", c);
19 if(!FileExists(fileName))
21 bitmap.Save(fileName, null, null);