?? 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 + -