📄 util.pas
字号:
unit util;
interface
uses Controls, Forms, Windows;
procedure EnableControl(AControl: TControl; Enable: Boolean);
procedure MsgBox(const Msg: string);
procedure ErrBox(const Msg: string);
implementation
procedure EnableControl(AControl: TControl; Enable: Boolean);
var
I: Integer;
begin
AControl.Enabled := Enable;
if AControl is TWinControl then
with TWinControl(AControl) do
begin
for I := 0 to ControlCount-1 do
EnableControl(Controls[I], Enable);
end;
end;
procedure MsgBox(const Msg: string);
begin
Application.MessageBox(PChar(Msg), PChar(Application.Title), MB_ICONINFORMATION);
end;
procedure ErrBox(const Msg: string);
begin
Application.MessageBox(PChar(Msg), PChar(Application.Title), MB_ICONERROR);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -