Can any one tell me how to add Scroll Bars to Picture Box?
Thanks in advance.
Printable View
Can any one tell me how to add Scroll Bars to Picture Box?
Thanks in advance.
Use HScrollBar and VScrollBar objects. You can link them to the PictureBox like this:
First, whenever you load a picture - set the dimensions of the scroll bars or enable/disable them.
Implement your custom paint method so that the image inside the picture box is drawn at coordinates that depend on the values of the scroll bars.
Whenever a scroll bar receives a scroll event, refresh the picture box.