none
How to delete Border that has been drawn on a control RRS feed

  • Question

  • Hi, I am sorry if this is a basic one but could not figure it out...

    I use 

     ControlPaint.DrawBorder(SomeForm.CreateGraphics(), SomeForm.ClientRectangle, Color.Red, ButtonBorderStyle.Solid);

    To draw a border around my form. How can i delete the border? drawing a new border with the same color as the background color will not work because it will be more wide and i want it in the original size. how can it be done?

    Thank you in advance

    Friday, October 11, 2019 6:20 PM

Answers

  • Use 

    ControlPaint.DrawBorder(SomeForm.CreateGraphics(), SomeForm.ClientRectangle, Color.Red, ButtonBorderStyle.None);
    (+ eventually SomeForm.Refresh(); )

    • Marked as answer by avivgood Monday, October 14, 2019 5:38 PM
    Saturday, October 12, 2019 8:21 AM