I created one class library file for visual inherited form for my project. In the class library project I take one form. In this form I take one panel control and its Modifiers
property set to public. Now my this form's name is BaseEditDialog
and the BaseEditDialog.cs
file is as following:
namespace BaseObjects
{
public partial class BaseEditDialog : System.Windows.Forms.Form
{
public BaseEditDialog()
{
InitializeComponent();
}
private void BaseEditDialog_Load(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Maximized;
}
public void BaseEditDialog_Resize(object sender, EventArgs e)
{
panel1.Left = (this.ClientSize.Width - panel1.Width) / 2;
panel1.Top = (this.ClientSize.Height - panel1.Height) / 2;
}
}
}
and in my actual project I take one inherited form selected with this BaseEditDialog.dll
file
My first question:
but in this form when I move panel control it easily moves but when I resize my form then the panel control automatically move to the center of the form at the design time. I inherit this form because when my application actually run at run time at that time panel is automatically reside at the center position of the form. but in my problem at design time when I resize my form then panel is centered out of the form.
my second question:
I cannot able to resize my panel control at design time.