// 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.
}
文章整理:站长天空 网址:http://www.z6688.com/
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




