注意、提示、错误通用对话框函数
2007-09-24 09:02
323 查看
procedure CreateError(const Msg: string; Sender: TWinControl;
ico: smallint);
var
flag: LongInt;
Info: string;
begin
case ico of
1:
begin
flag := MB_OK + MB_ICONWARNING;
Info := '注意';
end;
2:
begin
flag := MB_OK + MB_ICONERROR;
Info := '错误';
end
else
begin
flag := MB_OK + MB_ICONINFORMATION;
Info := '提示';
end;
end;
if (Sender <> nil) and (Sender.Visible) and (Sender.Enabled) then
Sender.SetFocus;
MessageBox(Screen.ActiveForm.Handle, PChar(Msg), PChar(Info), flag +
MB_APPLMODAL);
Abort;
end;
ico: smallint);
var
flag: LongInt;
Info: string;
begin
case ico of
1:
begin
flag := MB_OK + MB_ICONWARNING;
Info := '注意';
end;
2:
begin
flag := MB_OK + MB_ICONERROR;
Info := '错误';
end
else
begin
flag := MB_OK + MB_ICONINFORMATION;
Info := '提示';
end;
end;
if (Sender <> nil) and (Sender.Visible) and (Sender.Enabled) then
Sender.SetFocus;
MessageBox(Screen.ActiveForm.Handle, PChar(Msg), PChar(Info), flag +
MB_APPLMODAL);
Abort;
end;
相关文章推荐
- 虚函数的声明和定义与编译器错误提示
- 4. 用户在文本框1,2中输入两个数,点击按钮,在文本框3中显示从文本框1的数字到文本框2中的数字之间的累加和。如果1或则2为错误的数据格式,则弹出对话框提示错误。如果文本框1中的数字比文本框2中的数字大,则提示错误。
- Excel 中文版中插入函数对话框中关于 VLOOKUP 函数的参数的错误描述
- 需要注意安装时出现的错误提示与缺少类库的对应关系~~
- 拷贝出弹出对话框, 错误提示窗口中的文字
- Flash player debug版本不能弹出运行时错误提示对话框的解决办法
- Oracle函数执行提示“ORA-01422”,“ORA-06512”错误
- 录制QTP自带的flight系统时一直弹出一个对话框,提示Access toD:\QTPWorking\amples\light\app was denied.的错误
- php中使用header函数后,页面提示:Warnging: Cannot modify header information - headers already sent by 错误的的原因
- android通用的添加错误提示
- 提示、警告、错误、询问、关于对话框
- 装系统时总是提示 保存分区表时出现错误(0000000001)函数不正确
- 错误提示:Uncaught TypeError: xxxxx(此处为要调用的函数) is not a function
- Qt错误:Qt提示找不到slot()函数
- Powerdesigner老是提示打印错误对话框
- Mysql Workbench 创建函数总是提示语法错误
- 怎样解决打开word弹出宏的错误提示对话框的问题
- 装系统时总是提示 保存分区表时出现错误(0000000001)函数不正确
- emacs erlang ,debug,高亮,函数跳转,重构,错误提示,自动补全。一个都不少
- 如何去掉debug是讨厌的错误提示对话框