Drag a button control into the form.Change its text property as CLICK ME(text property changed by using properties window.) .Double click the button to view the code editor window.
Put the following code inside the button click event.
MessageBox.Show("Welcome to C#");
If you want to customize the message box
MessageBox.Show("Welcome to C#","Message",MessageBoxButtons.OKCancel ,MessageBoxIcon.Information );
Put the following code inside the button click event.
MessageBox.Show("Welcome to C#");
If you want to customize the message box
MessageBox.Show("Welcome to C#","Message",MessageBoxButtons.OKCancel ,MessageBoxIcon.Information );
Its very good example for MessageBox.
ReplyDelete.Net Training in chennai