![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#3
|
|||
|
|||
|
hola,
este codigo lo encontre hace algun tiempo en trucomania. procedure TForm1.Button1Click(Sender: TObject); var frmRegion, tempRegion: HRGN; i: Integer; Arect: TRect; begin frmRegion := 0; for I:= 0 to ControlCount - 1 do 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; 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 ); end; funciona con delphi6 y win2000(lo acabo de probar), el problema es que no se como devolver el estado normal, es decir quitar la transparencia. espero que te sirva. |
|
|
|