其中label 放到panel 中
实现lable1中文字在Panel1里从上往下滚动:
Load里写
this.timer1.Start();
private void timer1_Tick(object sender, EventArgs e)
{
int FWidth = this.panel1.Width;
int FHeight = this.panel1.Height;
Point LPos = new Point(this.label1.Location.X, this.label1.Location.Y);
if (LPos.Y < FHeight)
{
this.label1.Location = new Point(LPos.X, LPos.Y+2);
return;
}
else
{
this.label1.Location = new Point(0, 0);
}
}
本文介绍了一种在C# WinForms应用中实现Label文本在Panel控件内部从上至下滚动的方法。通过启动定时器并在定时器Tick事件中更新Label的位置来达到文本滚动的效果。

878

被折叠的 条评论
为什么被折叠?



