Ver Mensaje Individual
  #2  
Antiguo 30-05-2015
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola sac.

No me queda muy claro donde queres presentar ese form a un tercio del tamaño...
Pero creo que podrías usar el procedimiento mostrado en este enlace: How to Capture the Screen Shot of the Active Window, de forma similar a este ejemplo:
Código Delphi [-]
implementation 

uses Unit2;

procedure TForm1.FormCreate(Sender: TObject);
begin
  with Series1 do
  begin
    AddPie( 90, 'Cars', clRed);
    AddPie(309, 'Phones', clGreen);
    AddPie( 79, 'Monitors', clBlue);
    AddPie(607, 'Lamps', clWhite);
    AddPie(473, 'Keyboards', clGray);
    AddPie(354, 'Bikes', clFuchsia);
    AddPIe(830, 'Chairs', clTeal);
  end;
end;

procedure ScreenShot(activeWindow: bool; destBitmap : TBitmap) ;
var
  w,h: integer;
  DC: HDC;
  hWin: Cardinal;
  r: TRect;
begin
  if activeWindow then
  begin
    hWin := GetForegroundWindow;
    dc := GetWindowDC( hWin );
    GetWindowRect( hWin, r );
    w := r.Right - r.Left;
    h := r.Bottom - r.Top;
  end
  else
  begin
    hWin := GetDesktopWindow;
    dc := GetDC( hWin );
    w := GetDeviceCaps( DC, HORZRES );
    h := GetDeviceCaps( DC, VERTRES );
  end;
  try
    destBitmap.Width:= w;
    destBitmap.Height:= h;
    BitBlt( destBitmap.Canvas.Handle, 0,  0,
         destBitmap.Width, destBitmap.Height, DC, 0, 0, SRCCOPY );
  finally
    ReleaseDC( hWin, DC );
  end;
end;

procedure TForm1.btnShowClick(Sender: TObject);
var
  BM:TBitmap;
begin
  BM:= TBitmap.Create;
  try
    ScreenShot( TRUE, BM );
    Form2.Show;  // ( Auto-create forms )
    Form2.Height := Form1.Height div 3;  // 1/3 del alto
    Form2.Width  := Form1.Width div 3;  // 1/3 del ancho
    Form2.BorderStyle := bsNone;
    Form2.Image1.Picture.Bitmap.Assign( BM );
  finally
    FreeAndNil( BM );
  end;
end;

procedure TForm1.btnCloseClick(Sender: TObject);
begin
  Form2.Close;
end;

Salida:



Saludos
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
Responder Con Cita