Use Of C# MessageBox :
Displays a message box that can contain text, buttons, and symbols that inform and notify the user.
We Create C# Window Application That Display MessageBox When User Click On Button
Create Window Application
Drag Button Control From Toolbox And Drop On Form
Set Property Of Button Control From Property Window Like :
Text = Hello Message
Name = BTN_MSG
4. Generate "Hello Message" Button Of Click Event
From Property Window Select Event And Double Click On "Click"
5. MessageBox Codding
private void BTN_MSG_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello Message", "Hello",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
Here,"Hello Message" Means Body Of MessageBox
"Hello" Means Title Of MessageBox
MessageBoxButtons.OK Means Which Button Display On MessageBox
MessageBoxIcon.Information Means Display Information Icon With MessageBox
No comments:
Post a Comment