Ver Mensaje Individual
  #4  
Antiguo 01-06-2003
Avatar de marcoszorrilla
marcoszorrilla marcoszorrilla is offline
Capo
 
Registrado: may 2003
Ubicación: Cantabria - España
Posts: 11.221
Reputación: 10
marcoszorrilla Va por buen camino
Es muy fácil anula la parte que pinta el caption.

Código:
procedure TForm1.Button1Click(Sender: TObject);
var
  frmRegion, tempRegion: HRGN;
  i: Integer;
  Arect: TRect;
begin
  frmRegion := 0;
  for I := 0 to ControlCount - 1 do begin
    { create a region for the control }
    aRect := Controls[i].BoundsRect;
    { coordinates have to be window-relative, not client area relative }
    OffsetRect( aRect, clientorigin.x - left, clientorigin.y - top );
    tempRegion := CreateRectRgnIndirect( aRect );
    { merge the region with the "summary" region we are building }
    if frmRegion = 0 then
      frmRegion := tempRegion
    else
    begin
      CombineRgn( frmRegion, frmRegion, tempRegion, RGN_OR );
      DeleteObject( tempRegion );
    end;
  end;

  SetWindowRgn( handle, frmRegion, true );
end;
Un Saludo.

Última edición por marcoszorrilla fecha: 01-06-2003 a las 10:49:13.
Responder Con Cita