udialog.pas

来自「中式财务栏 表格式录入 运行时设置可显示列、列名、列宽」· PAS 代码 · 共 41 行

PAS
41
字号
//==============================================================================
// 通用对话框
//==============================================================================

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 + =
减小字号Ctrl + -
显示快捷键?