📄 utils.pas
字号:
unit utils;
interface
uses
Windows, Messages, SysUtils, Graphics, Forms, Dialogs, Controls, classes
, inifiles, mmsystem;
procedure ShowFormAsChild(var AForm: TForm; AFormClass: TClass;
AParent: TWinControl; AlignClient:Boolean = True);
implementation
{******************************************************************************}
procedure ShowFormAsChild(var AForm: TForm; AFormClass: TClass;
AParent: TWinControl; AlignClient:Boolean = True);
var
acW,acH:Integer;
i:Integer;
begin
if not Assigned(AForm) then
Application.CreateForm(TComponentClass(AFormClass), AForm);
for i := 0 to AParent.ControlCount -1 do
begin
if AParent.Controls[i] is TForm then
TForm(AParent.Controls[i]).Hide;
end;
AForm.Parent := AParent;
AForm.Left := 0;
AForm.Top := 0;
if AlignClient then
AForm.Align := alClient;
acW := AForm.ClientWidth;
acH := AForm.ClientHeight;
AForm.BorderStyle := bsNone;
AForm.Width := acW;
AForm.Height := acH;
AForm.BringToFront;
AForm.Show;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -