private void OpenDialog() { Dialog dialog = new Dialog(); // problem with ShowDialog() //dialog.ShowDialog(); // problem with ShowDialog(this) dialog.ShowDialog(this); // no problem with Show() //dialog.Show(); }
private void OpenDialogInvoke() { if (InvokeRequired) { Invoke((Action)OpenDialogInvoke); } else { Dialog dialog = new Dialog(); // problem with ShowDialog() //dialog.ShowDialog(); // problem with ShowDialog(this) dialog.ShowDialog(this); // no problem with Show() //dialog.Show(); } }
private void OpenDialog() { Dialog dialog = new Dialog(); dialog.ShowDialog(); }