Ir al contenido


Foto

[TRUCO DELPHI] Hacer un Formulario transparente.


  • Por favor identifícate para responder
No hay respuestas en este tema

#1 sir.dev.a.lot

sir.dev.a.lot

    Advanced Member

  • Miembros
  • PipPipPip
  • 545 mensajes
  • Location127.0.0.1

Escrito 28 noviembre 2016 - 02:37

[TRUCO DELPHI] Hacer un Formulario transparente.


delphi
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. var
  3. FullRgn, ClientRgn, ButtonRgn: THandle;
  4. Margin, X, Y: Integer;
  5. begin
  6. Margin := (Width - ClientWidth) div 2;
  7. FullRgn := CreateRectRgn(0, 0, Width, Height);
  8. X := Margin;
  9. Y := Height - ClientHeight - Margin;
  10. ClientRgn := CreateRectRgn
  11. (X, Y, X + ClientWidth, Y + ClientHeight);
  12. CombineRgn(FullRgn, FullRgn, ClientRgn, RGN_DIFF);
  13. X := X + Button1.Left;
  14. Y := Y + Button1.Top;
  15. ButtonRgn := CreateRectRgn
  16. (X, Y, X + Button1.Width, Y + Button1.Height);
  17. CombineRgn(FullRgn, FullRgn, ButtonRgn, RGN_OR);
  18. SetWindowRgn(Handle, FullRgn, True);
  19. end;

Saludos!


  • 2




IP.Board spam blocked by CleanTalk.