Hola,
hace tiempo hice algo parecido, lo único que se hace transparente hasta tal punto que puedes pulsar el botón que hay abajo, en el ejemplo que hice hay una linea visible y otra no, además de los controles que pongas en el form, pero se pueden poner las formas que quieras.
Pon un control en el formulario (creo que si no hay ninguno no funciona bien) y mira a ver que te parece:
Código Delphi
[-]
unit FormTransparente;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TfrmTransparente = class(TForm)
protected
procedure Paint; override;
public
constructor Create(AOwner: TComponent); override;
end;
implementation
constructor TfrmTransparente.Create(AOwner: TComponent);
begin
inherited;
Paint;
end;
procedure TfrmTransparente.Paint;
var
frmRegion, tempRegion: HRGN;
i: Integer;
Arect: TRect;
begin
inherited;
frmRegion := 0;
for I:= 0 to ControlCount - 1 do
begin
if Controls[i].Visible then
begin
aRect := Controls[i].BoundsRect;
OffsetRect( aRect, clientorigin.x - left, clientorigin.y - top );
tempRegion := CreateRectRgnIndirect( aRect );
if frmRegion = 0 then
frmRegion := tempRegion
else
begin
CombineRgn( frmRegion, frmRegion, tempRegion, RGN_OR );
DeleteObject( tempRegion );
end;
end;
end;
Arect.TopLeft := Point(0, 0);
Arect.BottomRight := Point(ClientWidth, 1);
tempRegion := CreateRectRgnIndirect( aRect );
CombineRgn( frmRegion, frmRegion, tempRegion, RGN_OR );
DeleteObject( tempRegion );
Arect.TopLeft := Point(0, ClientHeight-1);
Arect.BottomRight := Point(ClientWidth, ClientHeight);
tempRegion := CreateRectRgnIndirect( aRect );
CombineRgn( frmRegion, frmRegion, tempRegion, RGN_OR );
DeleteObject( tempRegion );
Arect.TopLeft := Point(0, 0);
Arect.BottomRight := Point(1, ClientHeight);
tempRegion := CreateRectRgnIndirect( aRect );
CombineRgn( frmRegion, frmRegion, tempRegion, RGN_OR );
DeleteObject( tempRegion );
Arect.TopLeft := Point(ClientWidth-1, 0);
Arect.BottomRight := Point(ClientWidth, ClientHeight);
tempRegion := CreateRectRgnIndirect( aRect );
CombineRgn( frmRegion, frmRegion, tempRegion, RGN_OR );
DeleteObject( tempRegion );
i:=1;
Arect.Left := 1;
Arect.Right := Width -1;
while i < Height do
begin
Arect.Top := i;
Arect.Bottom := i+1;
tempRegion := CreateRectRgnIndirect( aRect );
CombineRgn( frmRegion, frmRegion, tempRegion, RGN_OR );
DeleteObject( tempRegion );
i := i+3;
end;
SetWindowRgn( handle, frmRegion, true );
Canvas.Pen.Color := clBlack;
Canvas.Pen.Style := psSolid;
Canvas.Rectangle(0,0,ClientWidth, ClientHeight);
end;
end.
La verdad, la parte de los bordes no recuerdo para que está puesta ...