Could someone explain the reason why the code below does not work?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Speaker
{ public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("bravo you did it");
}
}
}
The window I have designed that corresponds to this code is a single window with a single button. I have the intention to do quite an extented program, but encountering problems, I decided to start with a small sample to see what's wrong, and I see neither this simple code works. Any suggestions? When I press the button1, nothing happens at all.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…