G
Guest
I'm new to C#, and I want to use a trackbar for the forms opacity
This is my code
decimal trans = trackBar1.Value / 5000
this.Opacity = trans
When I try to build it, I get this error
Cannot implicitly convert type 'decimal' to 'double
I tried making trans a double, but then the control doesn't work. This code worked fine for me in VB.NET. Any suggestions
This is my code
decimal trans = trackBar1.Value / 5000
this.Opacity = trans
When I try to build it, I get this error
Cannot implicitly convert type 'decimal' to 'double
I tried making trans a double, but then the control doesn't work. This code worked fine for me in VB.NET. Any suggestions