📄 winform.pas.~1~
字号:
unit WinForm;
interface
uses
System.Drawing, System.Collections, System.ComponentModel,
System.Windows.Forms, System.Data;
type
TWinForm = class(System.Windows.Forms.Form)
{$REGION 'Designer Managed Code'}
strict private
/// <summary>
/// Required designer variable.
/// </summary>
Components: System.ComponentModel.Container;
Button1: System.Windows.Forms.Button;
RadioButton1: System.Windows.Forms.RadioButton;
RadioButton2: System.Windows.Forms.RadioButton;
RadioButton3: System.Windows.Forms.RadioButton;
RadioButton4: System.Windows.Forms.RadioButton;
GroupBox1: System.Windows.Forms.GroupBox;
CheckBox1: System.Windows.Forms.CheckBox;
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure InitializeComponent;
{$ENDREGION}
strict protected
/// <summary>
/// Clean up any resources being used.
/// </summary>
procedure Dispose(Disposing: Boolean); override;
private
{ Private Declarations }
public
constructor Create;
end;
[assembly: RuntimeRequiredAttribute(TypeOf(TWinForm))]
implementation
{$AUTOBOX ON}
{$REGION 'Windows Form Designer generated code'}
/// <summary>
/// Required method for Designer support -- do not modify
/// the contents of this method with the code editor.
/// </summary>
procedure TWinForm.InitializeComponent;
begin
Self.Button1 := System.Windows.Forms.Button.Create;
Self.RadioButton1 := System.Windows.Forms.RadioButton.Create;
Self.RadioButton2 := System.Windows.Forms.RadioButton.Create;
Self.RadioButton3 := System.Windows.Forms.RadioButton.Create;
Self.RadioButton4 := System.Windows.Forms.RadioButton.Create;
Self.GroupBox1 := System.Windows.Forms.GroupBox.Create;
Self.CheckBox1 := System.Windows.Forms.CheckBox.Create;
Self.GroupBox1.SuspendLayout;
Self.SuspendLayout;
//
// Button1
//
Self.Button1.Location := System.Drawing.Point.Create(48, 16);
Self.Button1.Name := 'Button1';
Self.Button1.Size := System.Drawing.Size.Create(80, 32);
Self.Button1.TabIndex := 0;
Self.Button1.Text := '标准按钮';
//
// RadioButton1
//
Self.RadioButton1.Location := System.Drawing.Point.Create(24, 32);
Self.RadioButton1.Name := 'RadioButton1';
Self.RadioButton1.TabIndex := 2;
Self.RadioButton1.Text := 'Standard';
//
// RadioButton2
//
Self.RadioButton2.Location := System.Drawing.Point.Create(152, 32);
Self.RadioButton2.Name := 'RadioButton2';
Self.RadioButton2.TabIndex := 3;
Self.RadioButton2.Text := 'Popup';
//
// RadioButton3
//
Self.RadioButton3.Location := System.Drawing.Point.Create(24, 80);
Self.RadioButton3.Name := 'RadioButton3';
Self.RadioButton3.TabIndex := 4;
Self.RadioButton3.Text := 'Flat';
//
// RadioButton4
//
Self.RadioButton4.Location := System.Drawing.Point.Create(152, 80);
Self.RadioButton4.Name := 'RadioButton4';
Self.RadioButton4.TabIndex := 5;
Self.RadioButton4.Text := 'System';
//
// GroupBox1
//
Self.GroupBox1.Controls.Add(Self.RadioButton2);
Self.GroupBox1.Controls.Add(Self.RadioButton4);
Self.GroupBox1.Controls.Add(Self.RadioButton3);
Self.GroupBox1.Controls.Add(Self.RadioButton1);
Self.GroupBox1.Location := System.Drawing.Point.Create(16, 64);
Self.GroupBox1.Name := 'GroupBox1';
Self.GroupBox1.Size := System.Drawing.Size.Create(272, 120);
Self.GroupBox1.TabIndex := 6;
Self.GroupBox1.TabStop := False;
Self.GroupBox1.Text := '按钮的FlatStyle属性';
//
// CheckBox1
//
Self.CheckBox1.Location := System.Drawing.Point.Create(160, 16);
Self.CheckBox1.Name := 'CheckBox1';
Self.CheckBox1.Size := System.Drawing.Size.Create(120, 24);
Self.CheckBox1.TabIndex := 7;
Self.CheckBox1.Text := '标准按钮不可用';
//
// TWinForm
//
Self.AutoScaleBaseSize := System.Drawing.Size.Create(6, 14);
Self.ClientSize := System.Drawing.Size.Create(304, 205);
Self.Controls.Add(Self.CheckBox1);
Self.Controls.Add(Self.GroupBox1);
Self.Controls.Add(Self.Button1);
Self.Name := 'TWinForm';
Self.Text := '按钮组件示例';
Self.GroupBox1.ResumeLayout(False);
Self.ResumeLayout(False);
end;
{$ENDREGION}
procedure TWinForm.Dispose(Disposing: Boolean);
begin
if Disposing then
begin
if Components <> nil then
Components.Dispose();
end;
inherited Dispose(Disposing);
end;
constructor TWinForm.Create;
begin
inherited Create;
//
// Required for Windows Form Designer support
//
InitializeComponent;
//
// TODO: Add any constructor code after InitializeComponent call
//
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -