"I want to use a Track-Bar to change a Form's opacity. This is my code: decimal trans = trackBar1.Value / 5000; this.Opacity = trans;
When I build the application, it gives the following error:
Cannot implicitly convert type decimal to double
I have tried using trans and double, but then the Control doesn't work. This code worked fine in a past VB.NET project.
c# floating-point type-conversion double decimal
ShareShare a link to this question Copy linkCC BY-SA 4.0
Improve this question
Follow Follow this question to receive notifications
edited Feb 26 at 3:31
community wiki 45 revs, 35 users 9%Eggs McLaren"
|