出现提示:当前上下文中不存在名称"Invoke" 请问该怎么解决呀
private void timer1_Tick(object sender, EventArgs e)//时钟事件
{
Label lab = new Label();
Random rm = new Random();
int result = rm.Next(0 ,this.Width);
int aTz = rm.Next(65,91);
lab.AutoSize = true;
lab.Location = new System.Drawing.Point(result,0);
lab.Name = Convert.ToChar(result).ToString();
//lab.Size = new System.Drawing.Size(41, 12);
lab.Text = Convert.ToChar(aTz).ToString();
lab.Font = new Font( "新宋体 ",13);
lab.ForeColor = Color.Blue;
this.Controls.Add(lab);
//
Thread labelThread = new Thread(new ThreadStart(new MoveChar(lab,this).Move));
labelThread.Start();
}
public class MoveChar
{
private Label labTeam;
private Form formlab;
public MoveChar(Label lab, Form form)
{
labTeam = lab;
formlab = form;
}
public void Move()
{
while (true)
{
&n