Friday, 9 August 2013

Simple WinForms GUI application not working

Simple WinForms GUI application not working

I created a simple GUI with a button and two text boxes. I wrote the
following code:
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
textBox2.Text = "Hello ";
System.Windows.Forms.MessageBox.Show("hello");
}
}
}
But when I run this code and click button1, nothing happens; no message is
displayed. Is there something wrong in my code?

No comments:

Post a Comment