Tag Archives: select area

Use a rubber band box to let the user select an area in a picture in C#

The following shows the program’s startup code. private Bitmap m_OriginalImage = null; private int X0, Y0, X1, Y1; private bool SelectingArea = false; private Bitmap SelectedImage = null; private Graphics SelectedGraphics = null; // Save the original image. private void … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , | 8 Comments

Let the user select rectangular areas in an image in C#

This program lets the user click and drag to select rectangular areas in an image. The program starts by defining a couple of variables that it uses while selecting the area. // The original image. private Bitmap OriginalImage; // True … Continue reading

Posted in graphics | Tagged , , , , , , , , , | 6 Comments