+ 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); }

8th Aug 2018, 6:37 PM
רועי אבידן
רועי אבידן - avatar
1 ответ
0
If you may send the code and/or its results, that would be pleasant
9th Aug 2018, 5:26 AM
Eldar Bakerman