如何截获这个消息谢谢

解决方案 »

  1.   

    procedure timer.ontimer(Sender: TObject);
    var
      wnd:hwnd;
    begin
      findwindow(showmessage的对话框,nil);
      if h<>null then
           sendmessage(h,wm_close,0,0);
    end;
    不知你要的是不是这个!!
      

  2.   

    sorry
    procedure timer.ontimer(Sender: TObject);
    var
      wnd:hwnd;
    begin
      wnd:=findwindow(showmessage的对话框,nil);
      if wnd<>null then
           sendmessage(wnd,wm_close,0,0);
    end;
    不知你要的是不是这个!!
     
       wnd
      

  3.   

    我想他要问的意思是说ShowMessage('请确定')之后,想知道用户点击是"确定"按钮还是点击右上角的'X'关闭窗口的吧,如果是这样.很抱歉地告诉你,我无法实现.不过你可以使用这个代替.IF Application.MessageBox('真的要删除吗?', 36, '请确定')=6 Then //Delete
      

  4.   

    application.messagebox('','提示',33)=1
      

  5.   

    if Application.MessageBox('are you sure delete it?','',MB_OK)=mrOK then
    begin
      //delete the file
    end;
      

  6.   

    可以用上面的MESSAGEBOX,为什么非要用SHOWMESSAGE
      

  7.   

    只能用massagebox,  同意zhuojohn
    if Application.MessageBox('are you sure delete it?','',MB_OK)=mrOK then
    begin
      //delete the file
    end;