* Timer를 이용해서 Label을 HTML의 Marquee효과를 내면서 이동시킨다
{{{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace TestWindowFormDevils
{
public partial class Form1 : Form
{
int time = 0;
public Form1()
{
InitializeComponent();
}
private void pushButton_Click(object sender, EventArgs e)
{
if (timer.Enabled == true)
{
timer.Stop();
}
else timer.Start();
}
private void timer_Tick(object sender, EventArgs e)
{
time++;
string str = timerLabel.Text;
string strSub = str.Substring(1) + str[0];
timerLabel.Text = strSub;
label2.Text = time + "";
}
}
}
}}}
----------------------------------------------------------------
[데블스캠프2012]