📄 unit1.pas
字号:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, StdCtrls;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Memo1: TMemo;
procedure ReTailleR(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ D閏larations priv閑s }
public
{ D閏larations publiques }
end;
var
Form1: TForm1;
// x et y sont les valeures actuelle r閑lles
// x1 et y1 sont les differences.
// On initialiseras les autres variables au demarrage
groupx , groupy , memox, memoy, formx, formy, x , y ,x1 , y1 :integer;
implementation
{$R *.DFM}
procedure TForm1.ReTailleR(Sender: TObject);
begin
x := Form1.Width;
y := Form1.Height;
Form1.Caption := 'Taille du Form x = ' + IntToStr(x) + ' ' + 'Y = ' + IntToStr(y) + ' DelphiCool';
x1 := formx - x;
y1 := formy - y;
GroupBox1.Width := groupx - x1 ;
GroupBox1.Height := groupy - y1 ;
Memo1.Width := memox - x1 ;
Memo1.Height := memoy - y1 ;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
// On initialise les variable
groupx := GroupBox1.Width;
groupy := GroupBox1.Height;
memox := Memo1.Width;
memoy := Memo1.Height;
formx := Form1.Width;
formy := Form1.Height;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -