Hi i have the following code... where i generate my own image and paste in to excel worksheet, please can you tell me why its background color is always BLUE? is it possible somehow to change that for example to make it transparent or white? (i tried flag.MakeTransparent(); but it also does not work)
Bitmap flag = new Bitmap(200,200);
using (Graphics g = Graphics.FromImage(flag))
{
g.DrawString("N", new Font("Verdana", 80, FontStyle.Bold),
new SolidBrush(Color.Black), new PointF(40, 30));
}
System.Windows.Forms.Clipboard.SetDataObject(flag, true);
ws.Paste(range, Type.Missing);
when i use the following
flag.Save("C:\\image.png",System.Drawing.Imaging.ImageFormat.Png);
the image.png has transparent background...
thanks a lot!