📄 dynamicdemo.pas
字号:
unit DynamicDemo;
interface
procedure ShowStringForm (str: string);
implementation
uses
Forms, Controls, StdCtrls;
//设置待建窗体的各种属性。
procedure ShowStringForm (str: string);
var
form: TForm;
begin
Application.CreateForm (TForm, form);
form.caption := '动态创建窗体';//设置名字
form.Position := poScreenCenter;//设置位置为屏幕的中央
with TMemo.Create (form) do
begin
Parent := form;
Align := alClient;
Scrollbars := ssVertical; //设置有垂直滚动条
ReadOnly := True;
Color := form.Color;
BorderStyle := bsNone;
WordWrap := True;
Text := str; //设置窗体显示的内容
end;
form.Show; //显示窗体
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -