📄 udialog.pas
字号:
//==============================================================================
// 通用对话框
//==============================================================================
unit uDialog;
interface
uses
Forms, Windows, SysUtils;
procedure Info(AStr:string);
procedure Warn(AStr:string);
procedure Error(AStr:string);
procedure Question(AStr:string);
implementation
procedure Info(AStr:string);
begin
Application.MessageBox(PChar(AStr), '提示', MB_OK + MB_ICONINFORMATION);
end;
procedure Warn(AStr:string);
begin
Application.MessageBox(PChar(AStr), '警告', MB_OK + MB_ICONWARNING);
end;
procedure Error(AStr:string);
begin
Application.MessageBox(PChar(AStr), '错误', MB_OK + MB_ICONSTOP);
end;
procedure Question(AStr:string);
begin
if Application.MessageBox(PChar(AStr), '询问', MB_YESNOCANCEL + MB_ICONQUESTION) =
IDNO then abort;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -