Solved

ScrollBar??

Posted on 2001-07-27
8
256 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to open Waze.com/livemap from address saved in DB? 26 189
vbModal 12 51
Zip Folders Using Chilkat Routines 1 36
Error with a code discussed on this page 5 12
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

785 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