我也是新来的c#,我试图在按钮周围绘制矩形图形但不幸的是在放置组合框之后它不可见我尝试发送回来并带来前面选项仍然没有效果,如果我从表单中删除组框,这将绘制矩形并在表单中可见。
寻找专家可能的解决方案。
System.Drawing.Graphics graphicsobj;
graphicsobj = this.CreateGraphics();
Pen mypen = new Pen(System.Drawing.Color.Red, 5);
int x1[enter image description here][1] = button1.Location.X;
int y1 = button1.Location.Y;
int width1 = button1.Width;
int height1 = button1.Height;
graphicsobj.DrawRectangle(mypen, x1, y1, width1, height1);