本人想做一个2秒的等待画面 画面是gif格式的具有动画效果。但是画面加入以后图片没有动画效果, 想请教一下应该怎么改我的代码: public int load_Img(int n , string filepath) //取得图片 { m_nIndex = n; //图片顺序 string str = filepath + n.ToString()+".gif"; image = new Bitmap(str); panel.Invalidate(); return 0; } private void panel_Paint(object sender, System.Windows.Forms.PaintEventArgs e) //在panel上画图 { if(image != null) { e.Graphics .DrawImage (image ,0, 0, 165,195); } }
public void CreatTimer() //时间限制 { timer2 = new System.Windows.Forms.Timer(components); timer2.Enabled = true; timer2.Interval =2000; timer2.Tick += new System.EventHandler(timer2_Tick); timer2.Start(); Videoform.m_ldimg.load_Img(3,".\\WaitCartoon\\"); }