I've recently created a new control - a flat button - so no border, transparent background, no mouse down color, etc. The problem is, once the app is compiled and running, a black border is around the transparent background. I am going to attach two images - the first is how it looks on the app while running and second is how it looks on the design screen (how i want it to look). I'd appreciate any help getting this border to go away. Thank you!
public FlatButton() : base()
{
FlatStyle = System.Windows.Forms.FlatStyle.Flat;
FlatAppearance.BorderSize = 0;
FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255);
BackColor = Color.FromArgb(0, 255, 255, 255);
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Pen pen = new Pen(FlatAppearance.BorderColor, 0);
Rectangle rectangle = new Rectangle(0, 0, Size.Width - 2, Size.Height - 2);
e.Graphics.DrawRectangle(pen, rectangle);
}