Allow scrolling while making a diagonal picture montage in C#

[picture montage]

The post Make an improved diagonal picture montage in C# describes a program that lets you make a diagonal picture montage similar to the one shown above. I recently wanted to make a picture montage that was much bigger. There are two obvious approaches. First, you could scale the montage as you draw it and then save it at a larger scale. Second, you could let the user scroll the montage.

If you take the first approach, then you would need to convert mouse clicks for the scaled result. This is possible, but more work than the second approach, which is practically trivial. This example simply moves the picCanvas PictureBox control that displays the picture montage into a Panel control. That control’s AutoScroll property is set to true, so it automatically displays scroll bars if picCanvas is too large to fit.

That’s all there is to it. Download the example to experiment with it. Look at the code and see the previous post to see additional details.

Download Example   Follow me on Twitter   RSS feed   Donate

About RodStephens

Rod Stephens is a software consultant and author who has written more than 30 books and 250 magazine articles covering C#, Visual Basic, Visual Basic for Applications, Delphi, and Java.
This entry was posted in drawing, graphics, image processing, tools and tagged , , , , , , , , , , , , , . Bookmark the permalink.