C#显示对话框在WinForms中的另一个对话框? [英] C# Show dialog over another dialog in winforms?
本文介绍了C#显示对话框在WinForms中的另一个对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个winforms应用程序(C#),在我的一种表单中,我有一个对话框,该对话框在主表单中向数据网格添加了一些实体。在此对话框中,我确认如果它们无效,这些错误将显示在新对话框中。我的问题是此错误对话框显示在第一个对话框的背面...我该怎么做才能显示错误对话框
I have a winforms application (C#) and in one of my forms, i have a dialog that adds some entity to a datagrid in the main form. In this dialog, i have validations that if they are invalid, those errors are showed in a new dialog.. my problem is that this error dialog shows on the back of the first dialog... how can i do to show the errors dialog over the first dialog?
我的表单是这样的:
MainForm----DataGridButton---Add entity---> OpenDialog1 ---> OpenDialog1-Validation --- On Errors ---> OpenDialogErrors (This dialog is showed on the "back" of OpenDialog1)
OpenDialog1显示这样的OpenDialogErrors :
The OpenDialog1 shows the OpenDialogErrors like this:
FrmErrors err = new FrmErrors();
err.ShowDialog(this.MdiParent);
推荐答案
尝试以这种方式显示OpenDialogErrors:
Try to show OpenDialogErrors this way:
err.ShowDialog(this);
这篇关于C#显示对话框在WinForms中的另一个对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文