实现效果:
知识运用:
ToolStripStatusLabel控件的Image属性
public virtual Image Image { get;set; }
实现代码:
private void Form1_Load(object sender, EventArgs e) { int i = 1; string str=""; Thread th = new Thread( () => { while(true) { Invoke((MethodInvoker)(() => { toolStripStatusLabel1.Image = Image.FromFile((++i>9?(i=1):i).ToString()+".bmp"); })); Thread.Sleep(100); } }); th.IsBackground = true; th.Start(); }