Unit1.pas 750 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. unit Unit1;
  2. interface
  3. uses
  4. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5. Dialogs, StdCtrls;
  6. type
  7. TForm1 = class(TForm)
  8. rb1: TRadioButton;
  9. rb2: TRadioButton;
  10. rb3: TRadioButton;
  11. btn1: TButton;
  12. procedure btn1Click(Sender: TObject);
  13. private
  14. { Private declarations }
  15. public
  16. { Public declarations }
  17. end;
  18. var
  19. Form1: TForm1;
  20. implementation
  21. {$R *.dfm}
  22. { Realiza la acción del botón. }
  23. procedure TForm1.btn1Click(Sender: TObject);
  24. begin
  25. if rb1.Checked then
  26. begin
  27. Width := 640;
  28. Height := 480;
  29. end
  30. else if rb2.Checked then
  31. begin
  32. Width := 1024;
  33. Height := 768;
  34. end
  35. else if rb3.Checked then
  36. begin
  37. Width := 1366;
  38. Height := 768;
  39. end;
  40. end;
  41. end.