定义一个画笔对象,下列哪项错误()
A: Pen myPen=new Pen(Color.Red)
B: Pen myPen=new Pen(new SolidBrush(Color.Red))
C: Pen myPen=new Pen(Color.Red,5)
D: Pen myPen=new Pen(new Bitmap(“e:\\1.jpg”))
A: Pen myPen=new Pen(Color.Red)
B: Pen myPen=new Pen(new SolidBrush(Color.Red))
C: Pen myPen=new Pen(Color.Red,5)
D: Pen myPen=new Pen(new Bitmap(“e:\\1.jpg”))
举一反三
- 下列定义画笔对象p的语句中,正确的是___________。 A: Dim p As new Pen = Color.Red B: Dim p As Pen = New Pen(Color.Red, 3) C: Dim p As new Pen = Pen(Color.Red,1) D: Dim p As Pen(Color.Black) E: Dim p = Pen(Color.Black,2)
- 正确定义画笔的语句是: A: Pen p = new Pen(); B: Pen p = new Pen(3); C: Pen p = new Pen(Color.Red, 3); D: 都不对
- 绘制一个实心圆,下列代码正确的是 A: Graphics g=CreateGraphics();Pen myPen=new Pen(Color.Blue);g.DrawEllipse(myPen, new Rectangle(50, 50, 100, 100)); B: Graphics g=CreateGraphics();SolidBrush myBrush = new SolidBrush(Color.Blue);g.DrawEllipse(myBrush, new Rectangle(50, 50, 100, 100)); C: Graphics g=CreateGraphics();SolidBrush myBrush = new SolidBrush(Color.Blue); g.FillEllipse(myBrush, new Rectangle(50, 50, 100, 100)); D: Graphics g=CreateGraphics();Pen myPen=new Pen(Color.Blue);g.FillEllipse(myPen, new Rectangle(50, 50, 100, 100));
- 中国大学MOOC: 下列代码完成的功能,哪项表述正确()Pen myPen = new Pen(Color.Blue, 2);Graphics g = e.Graphics; g.DrawRectangle(myPen, 10, 10, 200, 10);
- My pen is not black. The red pen is ____. A: my B: I C: mine