c#控件调用问题,求高手指教

木水云 2011-12-29 08:43:06
怎样用button2调用button2的事件,求高手解答;比如:
private void button1_Click(object sender, EventArgs e)
{
this.textBox1.Text="学校";
}
private void button2_Click(object sender, EventArgs e)
{
我现在在这里也想要实现button1_Click的功能,但是想通过调用button1来实现。我该怎么写
}
...全文
49 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
bluedream2003 2011-12-30
  • 打赏
  • 举报
回复
借鉴一下
木水云 2011-12-29
  • 打赏
  • 举报
回复
还有一个类似的问题
窗体1
namespace manage.scool
{
public partial class time1 : Form
{

public time1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
在这里我又该如何才能调用到窗体2中的 bind2
方法 ,还望高手指教
}
}
}
窗体2
namespace manage.xuexiao
{
public partial class time2 : ImeForm
{
public time2()
{
InitializeComponent();
}
private void bind2
{
}
}
}
kkzhangyu 2011-12-29
  • 打赏
  • 举报
回复
this.button1_Click(sender,e)

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧