下了个ymPrompt消息提示组件 4.0 效果很好,就是不知道怎么获取到ymPrompt.confirmInfo返回值,通过什么方法可以知道他是返回‘确认’还是‘取消’。请教高高手。

解决方案 »

  1.   

    // initializes the variables to pass to the messagebox.show method.string message = "you did not enter a server name. cancel this operation?";string caption = "no server name specified";messageboxbuttons buttons = messageboxbuttons.yesno;dialogresult result;// displays the messagebox.result = messagebox.show(this, message, caption, buttons,messageboxicon.question, messageboxdefaultbutton.button1,messageboxoptions.rightalign);if(result == dialogresult.yes){//do your action here.} 
      

  2.   

     initializes the variables to pass to the messagebox.show method.string message = "you did not enter a server name. cancel this operation?";string caption = "no server name specified";messageboxbuttons buttons = messageboxbuttons.yesno;dialogresult result;// displays the messagebox.result = messagebox.show(this, message, caption, buttons,messageboxicon.question, messageboxdefaultbutton.button1,messageboxoptions.rightalign);if(result == dialogresult.yes){//do your action here.}     不明白什么意思