开发者

Clear Graphics Object to Black or other RGB

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 bla开发者_如何学Gock most of the time. Any help will be much appreciated!


objGraphics.Clear(Color.Black);

or

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


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜