Ver Mensaje Individual
  #2  
Antiguo 03-12-2004
Avatar de defcon1_es
defcon1_es defcon1_es is offline
Miembro
 
Registrado: mar 2004
Ubicación: Cuenca - España
Posts: 533
Reputación: 21
defcon1_es Va por buen camino
Hola, mira este código:
Código Delphi [-]
procedure Capturar_Pantalla;
var
  c: TCanvas;
  r: TRect;
  Foto: TBitmap;
  FotoJPEG : TJPEGImage;
begin
  c := TCanvas.Create;
  c.Handle := GetWindowDC(GetDesktopWindow);
  try
    r := Rect(0, 0, Screen.Width, Screen.Height);
    Foto := TBitmap.Create;
    Foto.Width := Screen.Width;
    Foto.Height := Screen.Height;
    Foto.Canvas.CopyRect(r, c, r);
//  Para convertir la captura de pantalla a jpg, el bmp ocupa mucho 
    FotoJPEG := TJPEGImage.Create;
    FotoJPEG.Assign(Foto);
    FotoJPEG.SaveToFile('MiCaptura.jpg');
  finally
    ReleaseDC(0, c.Handle);
    Foto.Free;
    FotoJPEG.Free;
    c.Free;
  end;
end;

Un salu2.
__________________
Progress Openedge
https://abevoelker.com/progress_open...dered_harmful/


Delphi forever...
Responder Con Cita