Scrollable PictureBox control

The PictureBox control in .NET does not have scroll bars, however, it is actually really easy to create a PictureBox control with scroll bars enabled. All you have to do is to drop a panel control onto a form, and set the AutoScroll property to true.

this.panel1.AutoScroll = true;

And drop a PictureBox control inside the panel and set the SizeMode to AutoSize.

this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;

That's it.

Print | posted on Sunday, June 21, 2009 10:14 PM

Feedback

No comments posted yet.

Your comment:





 
 

Copyright © HanSolo

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski