[Solved] Is it possible to create a dialog which only blocks its parent? [closed]


You can disable the opening Form instead of making the modal child truly modal..

You can try this: Open the ‘modal’ children with

this.Enabled = false;
FormDlg yourModalChildForm= new FormDlg(this);
yourModalChildForm.Show();

In the constructor write :

    Form myParent;

    public FormDlg(Form myParent_)
    {
        InitializeComponent();
        myParent = myParent_;
    }

And in the FormClosed write:

  private void FormDlg_FormClosed(object sender, FormClosedEventArgs e)
  {
      myParent.Enabled = true;
  }

solved Is it possible to create a dialog which only blocks its parent? [closed]