C# winform滚动字幕


private void timer1_Tick(object sender, EventArgs e)//用Timer来控制滚动速度 { label1.Left -= 2;//设置label1左边缘与其容器的工作区左边缘之间的距离 if (label1.Right < 0)//当label1右边缘与其容器的工作区左边缘之间的距离小于0时 { label1.Left = this.Width;//设置label1左边缘与其容器的工作区左边缘之间的距离为该窗体的宽度 } }

 添加一个 Timer时间控件 然后添加事件!  从右往左滚动

原文地址:https://www.cnblogs.com/hesijian/p/3281797.html