-2

嘿嘿伙计们,

你能帮我在桌面中间画一个圆圈吗?我对桌面坐标感到非常沮丧。这是一个覆盖

这是我的代码:

Graphics g = default(Graphics);
g = pictureBox1.CreateGraphics();
//g.DrawEllipse(Pens.Red, 10, 10, 200, 200);
int screenmiddlx = this.Width / 2;
int screenmiddly = this.Height / 2;
int kscreenmoddly = Height;
int kscreenmoddlx = Width;

g.DrawLine(Pens.Red, screenmiddlx - 10, screenmiddly, screenmiddlx + 10, screenmiddly);
g.DrawLine(Pens.Red, screenmiddlx, screenmiddly - 10, screenmiddlx, screenmiddly + 10);
g.DrawEllipse(Pens.Red,,,,);
4

1 回答 1

0

这是我的代码:

        Graphics kp = e.Graphics;
        kp.DrawEllipse(Pen, x, y, width, height);
        // exemple for you:
        kp.DrawEllipse(Pens.Red, screenmiddlx, screenmiddly, 20, 20);
于 2013-06-29T14:10:57.643 回答