Clear artwork to black or other RGB

I am starting to be familiar in C #. I am currently using this code:

        objGraphics.Clear(SystemColors.Control);

      

What I want to do is clear this object to black (or some other RGB color) and I don't understand how to replace SystemColors.Control with the preferred RGB color specification. Chances are I want most of them to be black. Any help would be much appreciated!

+2


a source to share


2 answers


objGraphics.Clear(Color.Black);

      

or



objGraphics.Clear(Color.FromArgb(r, g, b));

      

+2


a source


Color black = Color.FromName("Black");
objGraphics.Clear(black);

      



0


a source







All Articles