How to synchronize 2 slider controls? 
Author Message
 How to synchronize 2 slider controls?

Hi,

I am trying to synchronize 2 slider controls, set up as follows:

Slider1.Min = 1
Slider1.Max = 300
Slider1.SmallChange = 1

Slider2.Min = 1
Slider2.Max = 900
Slider2.SmallChange = 1

When I move "Slider1" I want "Slider2" to move in proportion so that they
both get to there max value at the same time.

I'm sure there's an easy way to get this to work, it's been a long day!!!!!!

Is this possible?

Thanks in advance.

Ian



Sat, 20 Nov 2004 06:57:08 GMT  
 How to synchronize 2 slider controls?
Private Sub Slider1_Scroll()
    Slider2.Value = (Slider2.Max - Slider2.Min) / (Slider1.Max -
Slider1.Min) * Slider1.Value
End Sub

Mikhail Berlyant
Data Integrator, Data Systems
Launch Your Yahoo!Music Experience  http://launch.yahoo.com
Brainbench MVP for Visual Basic   www.brainbench.com


Quote:
> Hi,

> I am trying to synchronize 2 slider controls, set up as follows:

> Slider1.Min = 1
> Slider1.Max = 300
> Slider1.SmallChange = 1

> Slider2.Min = 1
> Slider2.Max = 900
> Slider2.SmallChange = 1

> When I move "Slider1" I want "Slider2" to move in proportion so that they
> both get to there max value at the same time.

> I'm sure there's an easy way to get this to work, it's been a long
day!!!!!!

> Is this possible?

> Thanks in advance.

> Ian



Sat, 20 Nov 2004 07:10:11 GMT  
 How to synchronize 2 slider controls?
Hi Mikhail,

Thanks a lot, that works great.  Simple when you know how, eh!!!

Regards

Ian


Quote:
> Private Sub Slider1_Scroll()
>     Slider2.Value = (Slider2.Max - Slider2.Min) / (Slider1.Max -
> Slider1.Min) * Slider1.Value
> End Sub

> Mikhail Berlyant
> Data Integrator, Data Systems
> Launch Your Yahoo!Music Experience  http://launch.yahoo.com
> Brainbench MVP for Visual Basic   www.brainbench.com



> > Hi,

> > I am trying to synchronize 2 slider controls, set up as follows:

> > Slider1.Min = 1
> > Slider1.Max = 300
> > Slider1.SmallChange = 1

> > Slider2.Min = 1
> > Slider2.Max = 900
> > Slider2.SmallChange = 1

> > When I move "Slider1" I want "Slider2" to move in proportion so that
they
> > both get to there max value at the same time.

> > I'm sure there's an easy way to get this to work, it's been a long
> day!!!!!!

> > Is this possible?

> > Thanks in advance.

> > Ian



Sat, 20 Nov 2004 07:30:39 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ANN: Slider controlled drawings for your Word documents

2. Turning text off with slider control -VB6

3. Multi Slider Control

4. Slider Control help

5. turning off text display in the slider control

6. Slider control question

7. Make a Graphical Slider Control?

8. NEWBIE: Setting Slider control Background color

9. Using a slider to control windows media file

10. Help with Slider Control

11. Turning off slider control text property - VB6

12. Simple slider control question

 

 
Powered by phpBB® Forum Software