none
How do I pass RGB color values as C# arguments ?

    Question

  • Example

     

    graphicsObj = Graphics.FromImage(myBitmap);

    graphicsObj.Clear(System.Drawing.Color.White);

     

    Instead of passing System.Drawing.Color.White, how do I pass an RGB value ?

    Sunday, May 25, 2008 2:14 AM

Answers

  • Hi

     

     You could do like this.

     

     Color clr = Color.FromArgb(0,0,0);

     graphicsObj.Clear(clr);

     

                 (or)

     

    graphicsObj.Clear(Color.FromArgb(0,0,0);

     

    Thanks,

    sanjay.

    Sunday, May 25, 2008 3:06 AM