Insert this line of code right after the image is set in the picture box (and before you do the processing that takes so much time):
mypictureBox.Refresh();
This *should* force windows to re-draw the updated picture box right away.
I have done similar things in C# (basic games and such.) You will notice however as things get more complex with more pictures and movement that it really start to slow down. But for basic things your method of using picture boxes works fine.
I can help further if needed.
Main Topics
Browse All Topics





by: JoseParrotPosted on 2006-06-20 at 07:16:56ID: 16942767
Hi,
reBox pictbox;
);
Below is how to display an image in a picture box.
private System.Windows.Forms.Pictu
string path = "test.gif";
pictbox.Image = new Bitmap(path);
This code show how to take the bitmap data:
Bitmap b = new Bitmap(path);
BitmapData bmData = b.LockBits(new Rectangle(0, 0, b.Width, b.Height),
ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb
Jose