本文整理自网络,侵删。
procedure MsgWarning(const Msg: string);begin Application.MessageBox(PChar(Msg), 'Warning', MB_OK + MB_ICONWARNING);end;
procedure MsgInformation(const Msg: string);begin Application.MessageBox(PChar(Msg), 'Information', MB_OK + MB_ICONINFORMATION);end;
function MsgQuestion(const Msg: string):Boolean;begin Result:= Application.MessageBox(PChar(Msg), 'Information', MB_YESNO + MB_ICONINFORMATION)=IDYES;end;
procedure TForm1.Button1Click(Sender: TObject);beginMsgWarning('提示'); //黄色叹号MsgInformation('提示'); //蓝色叹号MsgQuestion('提示'); //是 否 对话框
end;
相关阅读 >>
Delphi getexplorerpid获取系统explorer.exe进程id
Delphi getsys32path()得到系统system32路径
更多相关阅读请进入《Delphi》频道 >>