Solved

Adding a scroll bar to picture control

Posted on 1997-09-20
3
429 Views
Last Modified: 2012-05-04
I want to be able to draw lines in a picture control at run time so the code would be something like
Picture1.Line (X1,Y1)-(Y2, Y2), RGB(0, 0, Color)

What if I want to draw more than the defined size of the Picture control.  Can I add scroll bar to the Picture control somhow so I can draw beyond the size of the Picture control and be ble to scroll?

If it is impossible, is there any other alternatives to do the same task? --> I need to draw lines, but I don't know how many lines I need to draw.  If it goes beyond the size of the initial screen, I want to be able to scroll up and down or right and left to see the entire picture.

Any suggestions will be greatly appreciated.
 
0
Comment
Question by:hkimhkim
3 Comments
 
LVL 1

Expert Comment

by:fideba
ID: 1435613
You can draw a scroll bar to the left of your picture control.  Whenever the user clicks the scrollbar, you can change the top property of the picture control (like: picture1.top = picture1.top + 1000).  This will make the picturecontrol behave like a scrolling control.

Filip
0
 

Author Comment

by:hkimhkim
ID: 1435614
I wanted to move the content (pictures drawn in the picture frame) not the picture frame itself.  If I do the way you described here using picture1.top=vscroll.value

The entire picture object moves up and down in the form.

Think of it as a textbox.  The content in the textbox moves but the textbox frame stays.  That's what I wnat to do.
0
 
LVL 3

Accepted Solution

by:
wolfcrag earned 50 total points
ID: 1435615
Check out the following Knowledge Base article, which details how to create scrollable picture boxes:

http://www.microsoft.com/kb/articles/q140/8/78.htm

(How to Create Scrollable Viewports in Visual Basic

  Last reviewed:
  December 8, 1995
  Article ID: Q140878)

Or if you have Visual Basic 3:

http://www.microsoft.com/kb/articles/q71/0/68.htm
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access - Capture pressed key onclick 4 28
MS Date Picker 64 bit 32 bit issue 12 49
Macro Excel - Multiple If conditions 2 62
Help me. 3 43
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

932 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

14 Experts available now in Live!

Get 1:1 Help Now