Solved

ScrollBar??

Posted on 2001-07-27
8
272 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
ID: 6327562
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
ID: 6327730
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
ID: 6329245
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 4

Expert Comment

by:amit_panjwani
ID: 6329273
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
 
LVL 5

Expert Comment

by:KDivad
ID: 6329280
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
ID: 6333092
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
ID: 7161615
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
ID: 7182464
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

820 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