Solved

Scroll Increment

Posted on 2006-06-22
3
208 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 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…

762 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

8 Experts available now in Live!

Get 1:1 Help Now