I have PictureBox picture.
I use:
picture.Size = bmp.Size; picture.Image = bmp; Let's say there are two integers maxWidth and maxHeigth.
I want to add vertical/horizontal scrollbar to picture when its size exceeds maxWidth and/or maxHeight. How can I do that?
Open the Scroll Bars options page by choosing Tools > Options > Text Editor > All Languages > Scroll Bars.
You can easily do it with a Panel Control
Insert a panel to your form, say panel1 and set
panel1.AutoScroll = true;
insert a PictureBox to the Panel, say picture and set
picture.SizeMode = PictureBoxSizeMode.AutoSize; and set the Image
picture.Image = bmp; hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With