Solved

Scroll Increment

Posted on 2006-06-22
3
214 Views
Last Modified: 2012-08-14
How do you make a scroll bar increment +/- .1 or less.
0
Comment
Question by:pat_cunningham
  • 2
3 Comments
 
LVL 9

Expert Comment

by:pradapkumar
ID: 16966356
incrementation of scroll bar in decimal values is not allowed in generic control. You may design one control for that sake.
0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 16966516
or for example if you want your scroll bar to go from 0 to 10 with .1 steps

Set Min = 0
Set Max = (10/.1)


Then on Value you could do:

msgbox (vSlider1.value * .1 )


Do you see how this is simulating the decimal values? Just an idea
0
 
LVL 19

Accepted Solution

by:
BrianGEFF719 earned 250 total points
ID: 16966530
Here is a working example, this example goes from 0 to 10 with a horinzontal scroll bar named HScroll1, it steps by .1 increments.

Private dblStep As Double
Private lngScrollMax As Long



Private Sub Form_Load()
dblStep = 0.1
lngScrollMax = 10

HScroll1.Min = 0
HScroll1.Max = (lngScrollMax / dblStep)
HScroll1.SmallChange = 1
HScroll1.LargeChange = 2


End Sub

Private Sub HScroll1_Change()
Dim dblValue As Double
dblValue = HScroll1.Value * dblStep

MsgBox "The Value is really: " & dblValue
End Sub
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

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…
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…
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…

815 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

12 Experts available now in Live!

Get 1:1 Help Now