Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can i use scrollBars to see a complet from?

Posted on 1999-06-23
3
Medium Priority
?
138 Views
Last Modified: 2010-05-02
hi,
i was drawing a big circle in the midel of a form,so i could not see the holl circle. How  can i use vertical & horizontal scroll Bars?
thanks for help
0
Comment
Question by:nilehawk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
wolfjjj earned 150 total points
ID: 1519361
OK first of all the scroll bars don't actually do anything by themselves, all they are is something which appears to the screen and they can be clicked on and their value changes accordingly.

OK So what you have to do is inside the Scroll bar_Click function you put your code. For your problem say the Vertical Scroll bar Code would be

CircleObject.top = (VScrollBar.Value * -1) * Multiplier

This is a pretty simple example but should show you how it works. CircleObject is as you can guess the Circle you drew. VScrollBar is the Scroll Bar Control.

I'm multiplying it by -1 so it's value is negated because you you scroll down the scroll bar value is increased and you want the CircleObjects Top Value to be decreased ie Down past 0

The Multiplier is just a constant/variable which you can change to whatever you like to. Obviously the higher it is set the more the Circle will move when it is clicked.

You don't have to use this but I've found it easier than stuffing around with the Min and Max values, it just makes things a little quicker and simpler to set up and get it working nicely.
0
 
LVL 1

Expert Comment

by:hddp666
ID: 1519362
You have to use a RichTextBox, PictureBox, or Frame or other control on the form to get the scrollbars to work on a form. There's an example in the VB examples, but I forget which one it is.
0
 

Author Comment

by:nilehawk
ID: 1519363
thank you (wolfiii)
thank you (hddp666)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…
Suggested Courses

670 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