[TUT] VB(2005) opticity slidder

DON'T post new tutorials here! Please use the "Pending Submissions" board so the staff can review them first.
Post Reply
bubzuru
.net coder
.net coder
Posts: 700
Joined: 17 Apr 2007, 16:00
17
Contact:

[TUT] VB(2005) opticity slidder

Post by bubzuru »

just add a scroll bar to your form and call it bar
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)
Download sorce code here : http://rapidshare.com/files/70032387/VB ... r.rar.html

Post Reply