您正在嘗試繪製整個表格,這肯定需要時間。如果你只想改變表格的一部分,在你的情況下是將炸彈人移動到新的位置,只需使你想要重新繪製的區域失效,然後將它傳遞給Invalidate方法。
做一些類似的事情。
//Invalidate previous position of bomberman
Rectangle invalid = new Rectangle(picturebox1.Location.x,picturebox1.Location.y,picturebox1.Width,picturebox1.Height);
Invalidate(invalid);
//Add code to move your picture box and then call above two lines again
invalid = new Rectangle(picturebox1.Location.x,picturebox1.Location.y,picturebox1.Width,picturebox1.Height);
Invalidate(invalid);
注肯定,但財產以後類似拋光的代碼將工作...
這裏是供參考的例子的鏈接。 http://msdn.microsoft.com/en-us/library/ms229628.aspx
請勿使用圖片框。重寫窗體的OnPaint()方法並使用e.Graphics.DrawImage()繪製牆。 – 2011-01-20 08:50:32