1. 程式人生 > WINDOWS開發 >C# winform滾動字幕效果

C# winform滾動字幕效果

 private void timer1_Tick(object sender,EventArgs e)
        {
            label1.Left -= 2;
            if (label1.Right < 0)
            {
                label1.Left = this.Width;
            }
        }

在窗體的定時器上編寫上面的程式碼就可以看到效果了。