- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个主窗体,其中包含一个用于打开子窗体的菜单:
public Le_MainForm()
{
InitializeComponent();
this.IsMdiContainer = true;
.....
}
private void barButtonItem_CreatOrdreAller_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
Close_AllForm();
Program.StatusOrdre = 1;
Program.AllerRetour = "Ordre Aller";
Fiche_Ordre f_Fiche = new Fiche_Ordre();
f_Fiche.MdiParent = this;
f_Fiche.Show();
}
它运行良好,但我从 child 那里打开另一个表格,我丢失了 MdiParent:
public Liste_Ordres()
{
InitializeComponent();
....
}
private void Liste_DobleClic(object sender, EventArgs e)
{
Fiche_Ordre f_Fiche = new Fiche_Ordre(gridView_Liste_Ordres.GetFocusedRowCellValue("NO_ORDRE").ToString());
f_Fiche.ShowDialog();
}
最佳答案
尝试像这样设置表单:
Fiche_Ordre f_Fiche = new Fiche_Ordre(gridView_Liste_Ordres.GetFocusedRowCellValue("NO_ORDRE").ToString());
f_Fiche.MdiParent = this.MdiParent;
f_Fiche.Show();
ShowDialog()
用于弹出模式窗体。
关于c# - 从子窗体设置 MdiParent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13382747/
我有一个主窗体,其中包含一个用于打开子窗体的菜单: public Le_MainForm() { InitializeComponent(); this.IsMdiContainer = tr
我有一个主窗体,其中包含一个用于打开子窗体的菜单: public Le_MainForm() { InitializeComponent(); this.IsMdiContainer = tr
有什么方法可以轻松地平铺 mdi parent 的所有表单 child 吗?我正在寻找 windows 提供的大部分功能,瓷砖级联。有谁知道一个简单的方法? 最佳答案 试试这些... // Tile
这个问题在这里已经有了答案: 关闭 10 年前。 Possible Duplicate: Cross-thread operation not valid 我正试图从另一个线程关闭表单的基础。我收到
我正在使用下面的代码设置 MdiParent 窗体的背景图像,它运行良好,但是当我单击最大化按钮时,背景图像在右侧和底部边缘重复(即右侧和底部图像部分重复) ,如何避免这种情况并正确显示图像? pub
我正在尝试开发一个应用程序,上面有一个 MDIParent 和几个 MDIchilds。我想在我的 MDIParent 上创建一个全局变量,并且我希望该变量可以从其子项访问。 我该怎么做? 最佳答案
我的父 mdi 窗体中有一个控件,如果所有 mdi 子窗体都已关闭,我希望它能获得焦点。我已经尝试连接到子窗体的 FormClosed 事件并从那里设置焦点,但是当我测试它时,当我关闭 mdi 子窗体
我当时正在开发一个库存软件,突然发现我需要一些主窗体,我应该通过它打开所有其他窗体,所以我创建了一个名为 frmMainPanel 的窗体,并使用菜单条将它链接到另一个窗体,我成功了在链接它们但它们在
我有 MdiParent 表单,其中有 Menu 和 Submenu如果我使用以下代码使用子菜单选项打开 Form B,则父窗体是 Say Form A B addbill = new B(); B.
我有一个 MDIform 应用程序,其中一个名为 MainForm 的窗体被设置为父窗体。每次我打开一个新窗体时,我都会关闭其他窗体,并使用自定义方法来完成此操作,该方法获取 3 个参数,其中一个是代
如何处理子表单中的 MDIParent 表单事件?例如,在父表单中,我有一个选项“在子网格上搜索”,当该按钮被点击时,在子表单中,网格上的一行获得焦点。 我正在使用 C# 3.5 Windows 窗体
当用户试图打开已在 MDIParent 中打开的子窗体时,我想避免我的子窗体出现多次。避免这种情况的一种方法是禁用 Controller (在我的例子中是 BUTTON),但我也为此功能提供了一个快捷
所以,我一直在 stackoverflow 和其他互联网论坛和知识库上搜索类似的主题,但到目前为止,我一直没有解决这个问题,我已经苦苦挣扎了整整一个星期。这是代码: private void
我有两个后台线程和一个线程来处理在我的 WinForms 应用程序上运行的最小化。当程序关闭时,我使用这种方法。 private void MyForm_Closing(object sender,
我需要从 MdiChild (frmB) 窗体打开模态窗体 (frmD) 而不会阻塞主窗体 (frmA) 和所有其他打开的 MdiChild 窗体 (frmC)。然后我切换到 frmC,frmD 是隐
我是一名优秀的程序员,十分优秀!