更改

我的作品:文华

添加603字节, 2019年11月25日 (一) 11:14
无编辑摘要
版权声明:本文为CSDN博主「a550853006a」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/a550853006a/article/details/45769215
----
 
public partial class Form1 : Form
{
Timer timer = new Timer();
string[] lines = { "hellow world", "nihao", "line3", "line4", "line5", "end" };
int currentLine = 0;
public Form1()
{
InitializeComponent();
timer.Interval = 300;
timer.Tick += delegate { currentLine++; this.Invalidate(); };
timer.Start();
}
protected override void OnPaint(PaintEventArgs e)
{
for (int i = 0; i < currentLine % lines.Length; i++)
{
e.Graphics.DrawString(lines[i], this.Font, Brushes.Black, 10, 20 * i);
}
}
}
23,882
个编辑