Pen p1 = new Pen(Color.BurlyWood);
g.DrawRectangle(p1, 60, 300 - 640/20, 35, 640/20);如何给我画出来的这个矩形填充颜色?
g.DrawRectangle(p1, 60, 300 - 640/20, 35, 640/20);如何给我画出来的这个矩形填充颜色?
解决方案 »
- 委托与多线程
- C++代码转换为C#
- c# 如何实现windows登录界面上右上角新添图标!(仿卡巴斯基一样)
- System.AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
- 请问winform中DataGridView中,如何禁止表格被选中?
- table 导出到Excel "0"丢失
- 使用webpart时出现错误,未解决!!
- C#中的枚举类型
- 请问在new了一个类class1后,如何在使用完时主动释放class1所占的资源!
- 两个关于水晶报表的问题!谢谢!
- str = ConfigurationSettings.AppSettings["ServerDbConStr_2"] 有可能不是从配置文件里读取这个变量的值吗
- 窗体上多个控件,只用一段代码处理动作的问题
PointF[] pf = new PointF[100];
byte[] bs = new byte[100];
for (int i = 0; i < 100; i++)
{
pf[i] = new PointF(yourXcoord, yourYcoord);
bs[i]=(byte)PathPointType.Line;
}
GraphicsPath gp = new GraphicsPath(pf,bs);
System.Drawing.Region re = new Region(gp);
g.FillRegion(Brushes.Green, re); gp.Dispose();
re.Dispose();
可以用颜色,图片等来制作brush
SolidBrush blueBrush = new SolidBrush(Color.Blue);查MSDN