Tag Archives: zoom

Use the mouse wheel to scale an image in C#

This example lets you use the mouse wheel to zoom in and out on an image. To use the mouse wheel, the program needs to catch the MouseWheel event. Unfortunately that event isn’t listed in the Form Designer so you … Continue reading

Posted in events, graphics, image processing | Tagged , , , , , , , , , , | Leave a comment

Zoom and scroll a picture drawn in C#

This program lets you zoom and scroll a picture drawn by the program. The program contains a Panel with AutoScale set to true. Inside the Panel is a PictureBox with SizeMode set to AutoSize. The PictureBox contains a Bitmap that … Continue reading

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

Let the user zoom on a picture in C#

The example Provide autosave in C# explains how to make a program that lets the user draw lines in different colors and styles. That program lets the user undo and redo, save and load drawings, and autosaves so it can … Continue reading

Posted in drawing, files, graphics, serialization | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

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 , , , , , , , , , , , , , , , , , , | 4 Comments

Zoom on a graph in WPF and C#

It’s remarkably easy to zoom on a graph in WPF. This example extends the example Let the user click on graph points in WPF and C#. To modify the previous version, you first need to rebuild the user interface a … Continue reading

Posted in algorithms, drawing, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 2 Comments

Resize pictures in a directory in C#

This example shows how to resize pictures in a directory. This program lets you enter a directory name and a scale factor. It then loads all of the bmp, gif, jpg, jpeg, and png files in that directory, resizes them, … Continue reading

Posted in files, graphics | Tagged , , , , , , , , , , , , , , , | 1 Comment

Resize images and save the results in C#

This program lets you load and resize images, and save the results into files. When the form loads, the following Load event handler saves the scale factor for each of the scaling menu items in their Tag properties. // Set … Continue reading

Posted in files, graphics | Tagged , , , , , , , , , , , , , | Leave a comment