Sascha B

Sascha B

  • NA
  • 237
  • 0

[Solved with Solution] Prevent picturebox from repainting

Feb 18 2011 5:09 AM
Hello,

currently I'm programming some sort of displaying measurement results.
So I drew nearly 30thousand dots on a pciturebox. A little bit slow but it works.
Here's my problem: When painting is done and i drag a windows window over this painting
the image starts to recreatet(reload) itself.


Things I did so far:
I painted everything on a bitmap file that is later on the picturebox with
 grafik.DrawImage(bitmap, 0, 0, bitmap.Width, bitmap.Height);
With this the image is drawn instantly and not dot for dot


I also tried to set the image of the picturebox to the bitmap.
But it results in a heavy laggy loop and doesn't solve my problem.


I set a bool that says me the image is already drawn but if I
drag a window over the image it gets just erased and due to
my bool not repainted




I want it like it is the picturebox's image then it would never reload...
I hope you understood my problem. If not, pls feel free to ask me.




I attached my code. Thanks and best regarts.

Answers (5)