C#: System.Windows.Forms.Timer”并不包含“timer1”的定义
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Da...
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 MouseLongDown
{
public partial class FormMouseLongDown : Form
{
public FormMouseLongDown()
{
InitializeComponent();
timer1.Interval = 1000; //计时器时间间隔
timer1.Tick += new EventHandler(time_Tick); //计时器事件发生函数
}
private void Form1_Load(object sender, EventArgs e)
{
Timer.timer1 = new Timer();
int timeout = 0;
MouseEventArgs mouseDown;
}
public EventHandler time_Tick { get; set; }
}
}
已经解决 展开
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 MouseLongDown
{
public partial class FormMouseLongDown : Form
{
public FormMouseLongDown()
{
InitializeComponent();
timer1.Interval = 1000; //计时器时间间隔
timer1.Tick += new EventHandler(time_Tick); //计时器事件发生函数
}
private void Form1_Load(object sender, EventArgs e)
{
Timer.timer1 = new Timer();
int timeout = 0;
MouseEventArgs mouseDown;
}
public EventHandler time_Tick { get; set; }
}
}
已经解决 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询