Click here to Skip to main content
15,919,879 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 5-Aug-11 21:58pm
v2

1 solution

Try this
frmMainPage objMainPage = new frmReportMenu(); 
 
frmReportMenu objReportPage = new frmReportMenu();
objReportPage.IsMdi=true; // OR objMainPage.isMdi=true
objReportPage.MDIParent = objMainPage;
this.close();
 
Share this answer
 
Comments
suniltikli 6-Aug-11 4:39am    
not working

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900