Tell me, please, how to circle the border of the control at the moment when it changes its size. Suppose there is a control panel with a height = 100 and a width = 0. At a certain moment, its width changes every second until it reaches a valid 100 pixels. The task is to draw a line at every second of time along the borders of this panel. For the form I use the following code:
void Opac1ty::Border_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e){ Skin^ sk = gcnew Skin; System::Drawing::Color border_color = System::Drawing::ColorTranslator::FromHtml(sk->l_p(send_forma->Name, "form", "border_color")); Pen^ pen = gcnew Pen(border_color, 2); e->Graphics->DrawRectangle(pen, 2, 2, send_forma->Width - 4, height - 4); } but the problem is that when the form is resized, the DrawRectangle is drawn every time the form is resized and the result is not erased every time the form is resized again, so in this code I draw only what should come out in the end.