莱鸟提问:这个简单的问题如何解决? 本帖最后由 saelec 于 2010-01-08 14:54:35 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 namespace test { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void timer1_Tick(object sender, EventArgs e) { this.timer1.Tick += new System.EventHandler(this.CheckUpdate); } private void CheckUpdate(object sender, EventArgs e) { //没有这个函数编译时又怎么能够通过 } } } this.CheckUpdate貌似应该是个方法 难道你添加事件的时候,在+=之后没有按两次Tab键吗? 添加为头的时候需要一个已经定义好的函数作为其参数类似于 private void CheckUpdate(object sender, EventArgs e) { //。 } namespace test { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void timer1_Tick(object sender, EventArgs e) { this.timer1.Tick += new System.EventHandler(this.CheckUpdate);////使用了没有定义的事件 } private void CheckUpdate(object sender, EventArgs e) { ///////这个事件你没有定义,在这里定义了就可以用了 } } } 这样还不行。还要在哪里加呢?namespace test{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void CheckUpdate1(object sender, EventArgs e) { } private void timer1_Tick(object sender, EventArgs e) { this.timer1.Tick += new System.EventHandler(this.CheckUpdate1); } }}这样还不行。还要在哪里加呢? public Form1() { InitializeComponent(); this.timer1.Tick += new System.EventHandler(this.CheckUpdate1); } listView 的 tag 问题 分段计算问题,在线等,急! 关于DataGridView的一个问题 c#中如何根据打印机名打开对应的“打印首选项”设置窗口 WinForm窗体问题 自定义控件 怎么在ACCESS中插入大量数据? 各位大虾,帮帮忙看下这段代码错在那里! 如何在datagrid中嵌入单选框和复选框? 请教.net(c#)中如何实现图像压缩技术?比如上传大图片直接转换成一定比例的小图片?请高手指教 求局域网实现传送文件的例子 求一个正则表达式
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{ } private void timer1_Tick(object sender, EventArgs e)
{
this.timer1.Tick += new System.EventHandler(this.CheckUpdate);
} private void CheckUpdate(object sender, EventArgs e)
{
//没有这个函数编译时又怎么能够通过
}
}
}
类似于
private void CheckUpdate(object sender, EventArgs e)
{
//。
}
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{ } private void timer1_Tick(object sender, EventArgs e)
{
this.timer1.Tick += new System.EventHandler(this.CheckUpdate);////使用了没有定义的事件
} private void CheckUpdate(object sender, EventArgs e)
{
///////这个事件你没有定义,在这里定义了就可以用了
}
}
}
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void Form1_Load(object sender, EventArgs e)
{ } private void CheckUpdate1(object sender, EventArgs e)
{
} private void timer1_Tick(object sender, EventArgs e)
{
this.timer1.Tick += new System.EventHandler(this.CheckUpdate1);
} }
}这样还不行。还要在哪里加呢?
{
InitializeComponent();
this.timer1.Tick += new System.EventHandler(this.CheckUpdate1);
}