请问大家,如何在C#中做Winform开发,实现消息提醒框?

解决方案 »

  1.   

    Using System.Window.Form;MessageBox.Show(msg);
      

  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. 
    }