the code takes a screen shot in a TBitmap object you need to use that to save it in to a file eg
SaveBitmap.SaveToFile('C:\Screenshot.bmp');
to make it a complete procedure
procedure SaveScreenShot(const aFilename:string);
var
ScreenDC: HDC;
SaveBitmap: TBitmap;
begin
SaveBitmap := TBitmap.Create;
try
SaveBitmap.SetSize(Screen.Width, Screen.Height);
ScreenDC := GetDC(0);
try
SaveBitmap.LoadFromDevice(ScreenDC);
finally
ReleaseDC(0, ScreenDC);
end;
SaveBitmap.SaveToFile(aFilename);
finally
SaveBitmap.Free;
end;
end;
just remember it will always be saved as a BMP file.