Example : How to display message in C#.
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show ("Welcome You all in Your Site Codershelpline");
}
}
}
Example : How to close form in C#.
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.Close(); //this.Hide();
}
}
}
0 Comments