System.Drawing.Graphics myGraphics; // 将窗体的 Graphics 对象指派给我们所建立的 Graphics 对象以便使用窗体来进行我们的绘制作业。
myGraphics = this.CreateGraphics(); // 下列程序代码会初始化一个采用指定之色彩的新 SolidBrush 对象。
SolidBrush solidBrush = new SolidBrush(Color.FromArgb(255, 255, 0, 0));
Pen GreenPan=new Pen (Color.Green);
// 填满一个椭圆形。
myGraphics.FillEllipse(solidBrush, 70, 170, 100, 60);
// 填满您先前所绘制的矩形。
myGraphics.FillRectangle(solidBrush, 50, 50, 50, 50);
把椭圆形变成蓝色
把矩形便成绿色怎么弄啊
高手谢谢!!!!
myGraphics = this.CreateGraphics(); // 下列程序代码会初始化一个采用指定之色彩的新 SolidBrush 对象。
SolidBrush solidBrush = new SolidBrush(Color.FromArgb(255, 255, 0, 0));
Pen GreenPan=new Pen (Color.Green);
// 填满一个椭圆形。
myGraphics.FillEllipse(solidBrush, 70, 170, 100, 60);
// 填满您先前所绘制的矩形。
myGraphics.FillRectangle(solidBrush, 50, 50, 50, 50);
把椭圆形变成蓝色
把矩形便成绿色怎么弄啊
高手谢谢!!!!
Pen GreenPan = new Pen (Color.Green);参考如下代码:
System.Drawing.Graphics myGraphics;
myGraphics = this.CreateGraphics();
SolidBrush solidBrush = new SolidBrush(Color.Blue);
myGraphics.FillEllipse(solidBrush, 70, 170, 100, 60);
solidBrush = new SolidBrush(Color.Green);
myGraphics.FillRectangle(solidBrush, 50, 50, 50, 50);
myGraphics.Dispose();