📄 unit1.pas
字号:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, jpeg, ExtCtrls, Buttons;
type
TForm1 = class(TForm)
StatusBar1: TStatusBar;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Button7: TButton;
Button8: TButton;
Button9: TButton;
Button10: TButton;
Button11: TButton;
Button13: TButton;
Edit1: TEdit;
Timer1: TTimer;
Edit2: TEdit;
Timer2: TTimer;
Image1: TImage;
procedure Button6Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
procedure Button10Click(Sender: TObject);
procedure Button11Click(Sender: TObject);
procedure Button13Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button6Click(Sender: TObject);
begin
close;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Button2.Caption := 'Integer';
Button3.Caption := IntToStr (SizeOf (Integer));
Button4.Caption := IntToStr (High (Integer));
Button5.Caption := IntToStr (Low (Integer));
end;
procedure TForm1.Button7Click(Sender: TObject);
begin
Button2.Caption := 'Byte';
Button3.Caption := IntToStr (SizeOf (Byte));
Button4.Caption := IntToStr (High (Byte));
Button5.Caption := IntToStr (Low (Byte));
end;
procedure TForm1.Button8Click(Sender: TObject);
begin
Button2.Caption := 'Cardinal';
Button3.Caption := IntToStr (SizeOf (Cardinal));
Button4.Caption := IntToStr (High (Cardinal));
Button5.Caption := IntToStr (Low (Cardinal));
end;
procedure TForm1.Button10Click(Sender: TObject);
begin
Button2.Caption := 'SmallInt';
Button3.Caption := IntToStr (SizeOf (SmallInt));
Button4.Caption := IntToStr (High (SmallInt));
Button5.Caption := IntToStr (Low (SmallInt));
end;
procedure TForm1.Button11Click(Sender: TObject);
begin
Button2.Caption := 'LongInt';
Button3.Caption := IntToStr (SizeOf (LongInt));
Button4.Caption := IntToStr (High (LongInt));
Button5.Caption := IntToStr (Low (LongInt));
end;
procedure TForm1.Button13Click(Sender: TObject);
begin
Button2.Caption := 'Word';
Button3.Caption := IntToStr (SizeOf (Word));
Button4.Caption := IntToStr (High (Word));
Button5.Caption := IntToStr (Low (Word));
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
timess:TDateTime;
begin
timess := Now;
Edit1.Text := FormatDateTime('HH:MM:SS',timess);
end;
procedure TForm1.Timer2Timer(Sender: TObject);
var
timess:Tdatetime;
begin
timess:=now;
Edit2.Text := FormatDateTime('YYYY/MM/DD',timess);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -