2
我有一種情況,需要將單選按鈕呈現給System.Drawing.Image。具有透明背景的RadioButtonRenderer
System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(20,16);
using (System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bitmap))
{
RadioButtonRenderer.DrawRadioButton(g, new Point(2, 2), RadioButtonState.CheckedPressed);
}
return System.Drawing.Image.FromHbitmap(bitmap.GetHbitmap());
此作品除了它的默認控制灰色作爲背景。我如何設置背景顏色爲透明?