public void DisPlayButton()
{
SimpleButton BT = new SimpleButton();
BT.Text = "aa";
BT.Location = new Point(30, 27);
BT.Size = new Size(110, 60);
forms.Controls.Add(BT);
BT.Click += new EventHandler(ShowForm);
} private void ShowForm(object sender, EventArgs e)
{
MessageBox.Show("你点击的是" + + "控件");
}我想MessageBox.Show我点击Button 的Text
{
SimpleButton BT = new SimpleButton();
BT.Text = "aa";
BT.Location = new Point(30, 27);
BT.Size = new Size(110, 60);
forms.Controls.Add(BT);
BT.Click += new EventHandler(ShowForm);
} private void ShowForm(object sender, EventArgs e)
{
MessageBox.Show("你点击的是" + + "控件");
}我想MessageBox.Show我点击Button 的Text
解决方案 »
- 急!搞了我一夜还是不行!GetResponseStream()返回乱码!怎么修改encoding都不成!求老师们帮帮忙!
- 如何将DataSet中的数据保存为UTF-8编码的xml
- (加急,在线)ListView排序问题,点击列标题时,老是报InvalidArgument=“1”的值对于“index”无效。
- 要.net(C#)的chm格式的帮助文档(一周内结贴)
- 正则表达式解析
- 为什么在线程中打开第二个窗体出错,代码如下:
- 一个小问题字符患的有谁能解决一下.谢了.
- 请教:win Form(C#)问题
- 关于ADO的问题,OpenSchema的参数值应该怎样设置
- 关于DATAGRID的属性设置
- 点击查看是出现的问题
- 不是有效的boolean有效值
private void ShowForm(object sender, EventArgs e)
{
string message=((Button)sender).Text;
MessageBox.Show("你点击的是" + message+ "控件");
}
{
SimpleButton button = (SimpleButton)sender;
string ss = button.Text;
MessageBox.Show("你点击的是" +ss + "控件");
}