I want to call a form to another form, but I want the calling form shows like dialog box(not resizing). I passing parameter to my new_customer form's constructor.
so My code is :-
new_customer NC = new new_customer(null);
NC.ShowDialog();
My new_customer form constructor :-
public new_customer(string formType="save")
{
InitializeComponent();
DC = new Data_Conn(Application.StartupPath);
DC1 = new Data_Conn(Application.StartupPath);
paraModi = formType;
}
Problem is when I call new_customer form from another form, its constructor doesn't execute,that's why I get an error when I use that variable :
Object reference not set to an instance of an object.
thanks In advanced ..