I have make a usercontrol with one label and one textbox and then add into MDI Form Panel, by the code below
mainpanel.Controls.Clear();
ctrLogin login = new();
mainpanel.Controls.Add(login);
The mainpanel is fill dock in MDI Form, whre ctrLogin is a usercontrol contain on label and one textbox, how can I make the usercontrol central with fewer code As I don't think it need to need on resize event and calculate the screen size. Also I need to the width of label and textbox is fix size as well
Thank you