Lose focus on a slider

Antoine
09-07-2003, 11:14 AM
Okay, maybe a strange topictitle, :D

I have a slider control, and the sliders range is from -99 till +99 when I slide it, it should make a stop at 0. So, is it possible to create the following.

When a run-time you slide de slider, that when I reaches zero, the focus is lost e.g. that I should click it again to control it again ?

Thanks allready !

Regards,
Antoine

bk2003
09-07-2003, 12:24 PM
Ok, here is a short example. I know this doesn't work 100%, but you can always start from here.

I set a check then the slider scrolls, and then the value is locked at zero. The problem is to unlock the slider (Drag_stop) when you start again from zero. It works this way , but you have to click the mouse on the slider surface..

/BK




Dim Drag_Stop As Boolean


Private Sub Slider_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Drag_Stop = False

End Sub

Private Sub Slider_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
Drag_Stop = False

End Sub

Private Sub Slider_Scroll()

If Drag_Stop Then Slider.Value = 0
If Slider.Value = 0 Then Drag_Stop = True

Label.Caption = Slider.Value
End Sub

Antoine
09-07-2003, 01:45 PM
Okay I will try something with that !

Thnx, maybe someone also has an idea ?

Grtz,
Antoine

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum