0

.Net Framework c#

i need an idea on this code. i got error message when i set the backcolor object redness = 0; ; Color colour = Color.FromArgb(255, redness, redness); btnPink.BackColor = colour;

20th Feb 2020, 9:54 AM
Aderibigbe Ebenezer Adewale
Aderibigbe Ebenezer Adewale - avatar
2 Answers
+ 1
Read the error message. Is it because it cant get colour from Argb? Is it a syntax error? Check if Argb is defined with int 0-255 or float 0.0 to 1.0 I dont have access to my PC to debug it there at the moment.
20th Feb 2020, 10:18 AM
Fernando Pozzetti
Fernando Pozzetti - avatar
+ 1
Need to pay attention to the method overloads, none of the overloads were designed to accept two object arguments following the alpha (opacity) argument. https://docs.microsoft.com/en-us/dotnet/api/system.drawing.color.fromargb
20th Feb 2020, 10:42 AM
Ipang