Tag Archives: rubber band box

Select parts of a scaled image in a PictureBox with different SizeMode values in C#

This example shows how you can select parts of a scaled image that has been stretched by a PictureBox. The example Copy, cut, and paste parts of an image to the clipboard in C# works okay if the PictureBox has … Continue reading

Posted in clipboard, graphics, image processing | Tagged , , , , , , , , , , , , , , , , , , | 5 Comments

Copy, cut, and paste parts of an image to the clipboard in C#

The first step in copying, cutting, or pasting an image to the clipboard is to use a rubber band box to select the part of the image to manipulate. This example lets you use a rubber band box to select … Continue reading

Posted in clipboard, graphics, image processing | Tagged , , , , , , , , , , , , , , | 9 Comments

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