Click here to Skip to main content
Sign Up to vote bad
good
See more: C#2.0VB.NET
Hi
 
I am working on windows application.
I have two windows basically.
when i open the child window,I am not able to access the main window.
I want to access both the child window and main window at time.
It should be active.
How to do that?
 

Regards
Froxy
Posted 12 Sep '12 - 1:09
froxy1K

Comments
vijay bisht - 12 Sep '12 - 8:00
inspite of showdialogue use only frm.show

2 solutions

You can enable the parent window using this:
private void Form_Activated(object sender, System.EventArgs e)
{
    if (this.Owner != null)
    {
        this.Owner.Enabled = true;
    }
}
Or use the following code to open your form:
Form newForm = new ChildForm();
newForm.Show(this);
 

 
--Amit
  Permalink  
What do you mean by access ? Accessing the dialog as a user perspective or programmer perspective.
 
Anyway, considering from user perspective, it seems that you've created the Model dialog. You've to create Modeless dialog for that.
 
Go through this[^] article.
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 253
1 Rohan Leuva 220
2 Sergey Alexandrovich Kryukov 208
3 Abhinav S 168
4 Mahesh Bailwal 165
0 Sergey Alexandrovich Kryukov 8,494
1 OriginalGriff 6,799
2 CPallini 3,603
3 Rohan Leuva 2,923
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 12 Sep 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid