void __fastcall TForm6::Photo()
{
int X0,Y0; bool Flag;
TRect ScreenRect;
TCanvas* ScreenCanvas=new TCanvas;
try
{
Top=0;
Left=Screen->Width;
Width=Screen->Width;
Height=Screen->Height;
ScreenRect=Rect(0,0,Width,Height);
ScreenCanvas->Handle=GetDC(0);
Image1->Canvas->CopyRect(ScreenRect, ScreenCanvas,ScreenRect);
ReleaseDC(Handle,ScreenCanvas->Handle);
Left=Top;
} __finally
{
delete ScreenCanvas;
}
}