Ver Mensaje Individual
  #3  
Antiguo 04-10-2006
afxe afxe is offline
Miembro
 
Registrado: jul 2004
Ubicación: Malaga-España
Posts: 273
Reputación: 20
afxe Va por buen camino
De piedra....

Después de dejarme los ojos buscando información sobre captura de pantallas en el foro me cuentas que esto:
Código:
var
  B: TBitmap;
  SrcDC : HDC;
  iLT : Integer;
begin
  iLT := GetSystemMetrics(SM_CYCAPTION);
  B := TBitmap.Create;
  B.Width  := Self.Width;
  B.Height := Self.Height-iLT;
  try
    SrcDC := GetWindowDC(Self.Handle);
    BitBlt(B.Canvas.handle, 0, 0, B.Width, B.Height, SrcDC, 0, iLT, SRCCOPY);
  finally
    ReleaseDC(Self.Handle, SrcDC);
  end;
  b.SaveToFile ('c:\t.bmp');
  b.Free;
end;
Equivale exactamente a esto:

Código:
begin
  GetFormImage.SaveToFile('c:\t.bmp');
end;
y sin el inconveniente de que capture las pantallas superpuestas.... pues eso.... de piedra .

Mil Gracias Seoane, era lo que necesitaba.
Responder Con Cita