then set the minimum value to 1 and the maximum value 100
and add this code to the scroll event
Code: Select all
'get the value of the scroll bar
Dim i As Integer = bar.Value
'add 0. to the start of i (22 becomes 0.22)
Dim value As String = 0 & "." & i
'if value is 0.100 (not a valid double)
If value = "0.100" Then
value = 1 'then make the value 1 (full Opacity)
End If
Me.Opacity = value 'set the opticity to value (between 0 & 1)