0

hi all,
i have a problem regarding the pixels. i have a picture box suppose of width 950 now i have to draw more than 1000 pixels in that picture box. one way is t0 use horizental scrollbar. but the problem is tha i dont know to use it.
so any suggestion please

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by Geekitygeek
0

the picturebox doesnt scroll by default. You can manually add scrollbar controls and redraw the image using the scroll events.
Alternatively, theres a simple guide here thats an easy way to add scolling. You just pu the picturebox inside a panel control. Set the panel control to AutoScroll and the size you want displayed (width=950) then set the picturebox to the size of the image.

0

thanx the problem i solved. i added a scrollbar in the form and move the picture box with the scrollbar. its workin fine but both the scrollbar appears at the end when the form is loaded.
but now the major problem is that i m drawing abt 3000000 of pixels in the picturebox and in this case the system hangs. if i put the value around 100000 then its workin fine.
how shud i come out of this??

0

Did you try the method in the link i gave you? Using a panel means you are just scrolling around the picutre, not redrawing it each time.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.