Visual Studio 2005 - Assign BackColor to button using RGB Color

Hi

I am trying to assign an Excel color as backcolor of a button on a Windows form using the RGB code RGB(45,67,89)
How do I do this?
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
Fernando SotoRetiredCommented:
Hi murbro;

Like this:

    Button1.BackColor = System.Drawing.Color.FromArgb(45, 67, 89)

Fernando
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Brilliant. Thanks for that
0
 
Fernando SotoRetiredCommented:
If you are working in C# then it will be:

    button1.BackColor = System.Drawing.Color.FromArgb(45, 67, 89);

Where:

    System.Drawing.Color.FromArgb( Red, Green, Blue)

Fernando
0
 
Fernando SotoRetiredCommented:
Glad I was able to help. :=)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.