Solved

ScrollBar??

Posted on 2001-07-27
8
234 Views
Last Modified: 2010-05-02
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.............
0
Comment
Question by:Iamme
8 Comments
 
LVL 22

Expert Comment

by:rspahitz
Comment Utility
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.
0
 
LVL 2

Expert Comment

by:damion69
Comment Utility
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.
0
 

Accepted Solution

by:
viklele earned 100 total points
Comment Utility
A couple of options :

1. Use Imaging for Windows (Kodak / Wang imaging control). It will provide a lot (believe me .. a lot) of additinal functionality too. Downside ... you can't distribute Kodak/Wang imaging control ... though it is free).

2. Create a scrollable view port and put your picture control indei that. I wouldn't say that making scrollable viewport is difficult, but its not something that one does everyday.

3. Buy third party view port control (VSView is one I know .. there must be a few more out there).

There is an implementation of scrollable viewport available in MSDN site. I ma providing the URL here, I see no point in cut-pasting the code here.

Try:
http://support.microsoft.com/support/kb/articles/Q186/4/29.asp

or

search for Q186429 on google.com, you will get a few more references and eloberations on microsoft's implementation.

- Vikram
0
 
LVL 4

Expert Comment

by:amit_panjwani
Comment Utility
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.

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 5

Expert Comment

by:KDivad
Comment Utility
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.
0
 
LVL 8

Expert Comment

by:glass_cookie
Comment Utility
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 : )
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
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
0
 
LVL 1

Expert Comment

by:Computer101
Comment Utility
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now