com.~pas

来自「这有很多Delphi应用的例子」· ~PAS 代码 · 共 50 行

~PAS
50
字号
unit Com;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label5: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  Variables: Integer;
procedure Change;
implementation

{$R *.dfm}
Procedure Change;
Var
  Variables:Integer;
Begin
  Variables:=10;
  Form1.Edit2.Text:=InttoStr(Variables);
End;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Variables:=20;
  Edit1.Text:=InttoStr(Variables);
  Change;
  Edit3.Text:=InttoStr(Variables);
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?