Click here to Skip to main content
12,889,448 members (50,825 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#2.0 C# VB VB.NET

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?

Posted 12-Sep-12 1:09am
vijay bisht 12-Sep-12 8:00am
inspite of showdialogue use only
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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();

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100