private Timer time = null;
public Form1()
{
InitializeComponent();
time = new Timer();
time.Enabled = false;
time.Interval = 100;
time.Tick += new EventHandler(time_Tick);
} void time_Tick(object sender, EventArgs e)
{
//throw new Exception("The method or operation is not implemented.");
this.label1.Top -= 1;
if (this.label1.Bottom <= 0)
{
this.label1.Top = this.panel1.Bottom;
}
} /// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
this.time.Start();
}
public Form1()
{
InitializeComponent();
time = new Timer();
time.Enabled = false;
time.Interval = 100;
time.Tick += new EventHandler(time_Tick);
} void time_Tick(object sender, EventArgs e)
{
//throw new Exception("The method or operation is not implemented.");
this.label1.Top -= 1;
if (this.label1.Bottom <= 0)
{
this.label1.Top = this.panel1.Bottom;
}
} /// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
this.time.Start();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货