各位请近来看一下,简单问题!

thebest123 2003-08-22 10:54:57
请问我想在删除一条记录之前弹出一个对话框,请问是不是用messagebox函数?应该怎么写?!谢谢各位!
...全文
31 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
IORILI 2003-08-22
  • 打赏
  • 举报
回复
同样满足你的要求::::
procedure Tcpya_app.SpeedButton2Click(Sender: TObject);
begin
if MessageDlg('确定要删除吗',
mtConfirmation, [mbYes, mbNo], 0) = mrYes then
dbmod2.spyf.Delete;
end;
ysycrazy 2003-08-22
  • 打赏
  • 举报
回复
if MessageBox(Handle, '提示', '是否删除此记录?', mb_okcancel+MB_ICONINFROMATION)=IDOK then
删除
else
取消
ZyxIp 2003-08-22
  • 打赏
  • 举报
回复
if MessageBox(Handle, '提示', '是否删除此记录。', MB_ICONINFROMATION+MB_YESNO)=IDOK then
删除
else
取消
lxpbuaa 2003-08-22
  • 打赏
  • 举报
回复
MessageBox(Handle, '提示', '该记录已经成功删除。', MB_ICONINFROMATION+MB_OK);

————————————————————————————————————
宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
————————————————————————————————————
thebest123 2003-08-22
  • 打赏
  • 举报
回复
application 有用的!没有application 就会报错
DouZHlang 2003-08-22
  • 打赏
  • 举报
回复
application 是多余的
thebest123 2003-08-22
  • 打赏
  • 举报
回复
belllab(bell) 呵呵,我不知道什么意思,跟我刚才问的有没有关系?
不过我问题已经解决了,我现在只是想知道Handle是什么意思!
belllab 2003-08-22
  • 打赏
  • 举报
回复
hWnd

Identifies the owner window of the message box to be created. If this parameter is NULL, the message box has no owner window.
thebest123 2003-08-22
  • 打赏
  • 举报
回复
lemon_wei(他山之石来攻玉) Handle,这个参数是什么意思?
好象没有Handle, 就可以的!
有没有那位好心人告诉我Handle在这里是什么意思?
duxin 2003-08-22
  • 打赏
  • 举报
回复
showmessage
MessageDlg
MessageBox

都可以 主要是你要在 相应事件里写
lemon_wei 2003-08-22
  • 打赏
  • 举报
回复
好象要加application吧?
if application.messagebox(Handle, '提示', '是否删除此记录。',
MB_ICONINFROMATION+MB_YESNO)=IDOK then
删除
else
取消

5,379

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧