Link to home
Start Free TrialLog in
Avatar of Iamme
IammeFlag for Mexico

asked on

ScrollBar??

Well I hava a problem... I must show a picture but when the piscture is bigger than teh object is doesn't shows comlpetly.... I want to add a scrollbar but I don't know how to implement it
can U explain me??? please
if you have code is better for me..
Tnks.............
Avatar of rspahitz
rspahitz
Flag of United States of America image

The best way I've found is to drop the picturebox into a frame along with the scrollbar(s), then have the scrollbars min set to 0, max set to frame.width - scrollbar.width, then add code to the Scroll event procedure to move the picture based on the negative of the value.
Avatar of damion69
damion69

Well you could also use the image control instead of the picture control. The image control has a property called stretch which will stretch the picture to the size of the image control reducing or increasing the size of the picture.
ASKER CERTIFIED SOLUTION
Avatar of viklele
viklele

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you should refer MSDN , i has complete example for your scenario.

Basically it is PIP - PictureBox in PictureBox, and you have scroll bars - you can use intrinsic scrollbars or flat scrollbars.

The innner picturebox has property somewhat in effect which says - stretch to picture size.
which must be set to true.

Since it is there in MSDN, I will paste the code/link if you need it.

I have made exactly what amit and others describe. If you can't find it in MSDN, let me know and I'll paste an example .frm file here.
Avatar of glass_cookie
Hi!

Here's a file over the net for you:

Download....
http://www.vb-helper.com/Howto/dragmap.zip

Description: Use a small map window to let the user view a larger picture (26K)

That's it!

glass cookie : )
Hi Iamme,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept viklele@devx's comment(s) as an answer.

Iamme, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Comment from expert accepted as answer

Computer101
E-E Moderator