How to make a desktop screenshot?
function GetDesktopScreenShot:TBitmap;
var
Desktop:HDC;
begin
Result:= TBitmap.Create;
Desktop:= GetDC(0);
try
try
Result.PixelFormat := pf32bit;
Result.Width := Screen.Width;
Result.Height := Screen.Height;
BitBlt(Result.Canvas.Handle,0,0, Result.Width, Result.Height, Desktop,0,0,SRCCOPY);
Result.Modified := True;
finally
ReleaseDC(0,Desktop);
end;
except
Result.Free;
Result:=nil;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Image1.Picture.Bitmap := GetDesktopScreenShot;
end;
TXLSFile is a Borland Delphi library for reading and writing...
As developers we're always doing the same tasks over again, ...
With the following code we can make transparent DBGrid. ...
IB Objects is the most powerful toolbox available for develo...
You can create a gradient filled form to make form that is m...
Sunday 21 Jan 2007 | Delphi Tutorial | Forms