Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. type
  2. TForm1 = class(TForm)
  3. Button1: TButton;
  4. procedure Button1Click(Sender: TObject);
  5. procedure FormCreate(Sender: TObject);
  6. private
  7. { Private declarations }
  8. panl: TPanel;
  9. public
  10. { Public declarations }
  11. end;
  12.  
  13. implementation
  14.  
  15. procedure TForm1.FormCreate(Sender: TObject);
  16. var
  17. hr: hRgn;
  18. begin
  19. panl := TPanel.Create(self);
  20. panl.Left := 10;
  21. panl.Top := 10;
  22. panl.Width := 100;
  23. panl.Height := 50;
  24. panl.ParentBackground := False;
  25. panl.ParentColor := False;
  26. panl.Color := clYellow;
  27. panl.Parent := self;
  28. hr := CreateEllipticRgn(1,1,100,50);
  29. SetWindowRgn(panl.Handle, hr, True);
  30. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement