如何从弹出页面设置Windows应用程序MdI父级 [英] How to Set windows application MdI parent from a popup page
问题描述
大家好,
我在从弹出页面窗口设置MDI父子窗体时遇到问题.
scenerio-
1.我运行Windows应用程序.
2.登录窗口弹出,我们通过登录凭证并成功登录.
3.在包含不同菜单的Windows应用程序的主页中输入.
4.有一个特定的菜单,单击该菜单会打开一个弹出式登录窗口,该窗口需要一个特定的密码才能访问该菜单的内容.
5.如果传递正确的密码,则弹出窗口应关闭,内容页面应设置为MDI父级的clild页面.
我在弹出式提交按钮上使用此代码,如果密码正确,请单击:-
hi all,
i have a problem to set the MDI Parent Child Form from popup page window.
scenerio-
1. i run my windows application.
2. login window popup, we pass the login credentials and login successful.
3. enter in main page of windows app which contains different menus.
4. there is a specific menu, on clicking that menu a poup login window opens which required a specific password to access the content of that menu.
5. if we pass correct pasword, the popup should close and the content page should set to MDI parent''s clild page.
I m using this code on popup submit button click if password is correct:-
//setting the object of main page
frmMainPage objMainPage = new frmReportMenu();
//settign the object of page, which needs to be opened next
frmReportMenu objReportPage = new frmReportMenu();
objReportPage.MDIParent = objMainPage;
this.close();
-------------------------
但是此代码无法正常工作
-------------------------
but this code is not working properly
推荐答案
尝试一下
frmMainPage objMainPage = new frmReportMenu();
frmReportMenu objReportPage = new frmReportMenu();
objReportPage.IsMdi=true; // OR objMainPage.isMdi=true
objReportPage.MDIParent = objMainPage;
this.close();
这篇关于如何从弹出页面设置Windows应用程序MdI父级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!