tags:

views:

39

answers:

2

I am a rank beginner 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'm stumped as to how to replace the SystemColors.Control with, preferably, an RGB color spec. I'd probably want to clear to black most of the time. Any help will be much appreciated!

A: 
Color black = Color.FromName("Black");
objGraphics.Clear(black);
Gerrie Schenck
+2  A: 
objGraphics.Clear(Color.Black);

or

objGraphics.Clear(Color.FromArgb(r, g, b));
CnTwo
Easy! Thanks! StackOverflow won't let me rate answers, so I apologize for that.
Jimmy
I see you've sorted it now. Thanks :)
CnTwo