I\'m using Windows Forms. For a long time, pictureBox.Invalidate();
worked to make the screen be redrawn. However, it now doesn\'t work and I\'m not sure why.>
Invalidate
or Refresh
will do the same thing in this case, and force a redraw (eventually). If you're not seeing anything redrawn (ever), then that means either nothing has been drawn at all in DrawWorldBox
or whatever has been drawn has been drawn off the visible part of the PictureBox's image.
Make sure (using breakpoints or logging or stepping through the code, as you prefer) that something is being is being added to selectionRectangles
, and that at least one of those rectangles covers the visible part of the PictureBox. Also make sure the pen you're drawing with doesn't happen to be the same color as the background.