Hi Experts
I want to take the bitmap picture of a window without showing it, I am using the below code but its only giving the client area, but I want get te whole window as if we are doing Alt + PrintScreen (Take a picture of it while it is active possible but i want it without showing the window) i just want to pass a Form to the procedure and get its picture
procedure PaintWinControl(WinControl:TWinConTrol);
var
lBitMap: TBitmap;
begin
lBitMap := TBitmap.Create;
lBitMap.Width := 0;
lBitMap.Height := 0;
lBitmap.Width := WinControl.Width;
lBitmap.Height := WinControl.Height;
try
WinControl.PaintTo(lBitmap.Canvas.Handle,0,0);
lBitMap.SaveToFile('C:\FormPicture.bmp');
finally
lBitMap.Free;
end;
end;
Pls anybody do help me to sort it out
Hopefully
JPattom
I want to take the bitmap picture of a window without showing it, I am using the below code but its only giving the client area, but I want get te whole window as if we are doing Alt + PrintScreen (Take a picture of it while it is active possible but i want it without showing the window) i just want to pass a Form to the procedure and get its picture
procedure PaintWinControl(WinControl:TWinConTrol);
var
lBitMap: TBitmap;
begin
lBitMap := TBitmap.Create;
lBitMap.Width := 0;
lBitMap.Height := 0;
lBitmap.Width := WinControl.Width;
lBitmap.Height := WinControl.Height;
try
WinControl.PaintTo(lBitmap.Canvas.Handle,0,0);
lBitMap.SaveToFile('C:\FormPicture.bmp');
finally
lBitMap.Free;
end;
end;
Pls anybody do help me to sort it out
Hopefully
JPattom