Trackbar Scroll Transparency

By afp_romania on Dec 02, 2012

This code can make your form transparent in 12 states with a trackbar.
Instead of Chat_Activated you can set Form1.

Private Sub Chat_Activated(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Activated
        TrackBar1.SetRange(1, 12)
        TrackBar1.Value = 12
    End Sub

    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Me.Opacity = TrackBar1.Value / 12
    End Sub

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.