+ 2
How to make an ellipse control
I tried creating an Ellipse class that inherits WinForms Control class and override OnPaint to draw ellipse. When i start the program if BackColor is a visible color, it draws a rectangle of the color of BackColor. I know it is from OnPaintBackground but if i override it, It does very strange things. Ideas? the class : class Ellipse : Control { public Ellipse {} protected override void OnPaint (PaintEventArgs pe)=> pe.Graphics.FillEllipse (new SolidBrush (BackColor), pe.ClipRectangle); }
1 Réponse
0
If you may send the code and/or its results, that would be pleasant