⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 util.pas

📁 在深度历险网站上发布的所有delphi程序原码。对初学delphi者很有用。
💻 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 + -