3.跑馬燈

int a = 5;

private void button1_Click(object sender, EventArgs e)

{

timer1.Enabled = true;

timer1.Interval = 1000;

}

private void timer1_Tick(object sender, EventArgs e)

{

string temp;

temp = textBox1.Text + textBox1.Text;

label1.Text = temp.Substring(a,5);

a++;

if (a > textBox1.Text.Length)

a = 1;

}