Hi Everybody, Im making a kind of notepad in VB 2008.
But the problem is ive maked an Form whith a trackbar and a Buttton,
its supposed that the trackbar should be the opacity value.
The trackbar is changed to rigth to left,
It comes no errors it just wont work,
(TB1 is the name of the trackbar!) the code is:

Public Class Form3

    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TB1.Scroll

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Form1.Opacity = TB1.Value()
    End Sub
End Class

MVH Dajak

Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
    Form1.ActiveForm.Opacity = TrackBar1.Value / TrackBar1.Maximum
End Sub

First of all thanks for the code, but there was one error...
it was quite easy to fix:
youmuse remove the
Form1.ActiveForm.Opacity = TrackBar1.Value / TrackBar1.Maximum

ok.
so this thread was solved or not?

Solved, thanks JX_Man

You're Welcome friend...
Don't forget to mark this thread Solved :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.