Formulario Transparente con delphi;
aca les dejo la funcion implementada en un proyecto, esta la colocan en la parte publica del formulario y listo le cambia las propiedades al formulario.
//HAGO EL FORMULARIO TRANSPARENTE//
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;
{ create a region for the caption and menu bar and add it to the summary }
tempregion := CreateRectRgn( 0, 0, Width, GetSystemMetrics( SM_CYCAPTION )+
GetSystemMetrics( SM_CYSIZEFRAME ) +
GetSystemMetrics( SM_CYMENU ) * Ord(Menu <> Nil));
CombineRgn( frmRegion, frmRegion, tempRegion, RGN_OR );
DeleteObject( tempRegion );
SetWindowRgn( handle, frmRegion, true );
//FIN//
Deja tu comentario o agradecimiento...
Comentarios
Publicar un comentario