Advertisement

05.05.2008 at 03:38PM PDT, ID: 23378010
[x]
Attachment Details

How do I open a modal dialog box in C#.Net that is modal only to the parent form?

Asked by tjw_bld in C# Programming Language, .NET

Tags: c#.Net

I am using C# with .Net 1.1.

I would like to open a modal dialog box using the functionality of ShowDialog, but I only want the parent form to be disabled for input.  I would like the other windows to continue to receive user input.  I also want to maintain the functionality that ShowDialog does not return until the modal dialog box closes so I can test which button was pressed.

A few solutions that I have found suggested opening the form modeless and disabling the parent form until a button is pressed.  I see two problems with this solution: 1) the buttons on the parent form are all grayed out, which does not look like standard modal behavior, and 2) what mechanism should I use to wait for the dialog box to close (Show returns immediately, but ShowDialog returns only after the modal window closes)?
Start Free Trial
[+][-]05.05.2008 at 06:02PM PDT, ID: 21504115

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.05.2008 at 06:38PM PDT, ID: 21504233

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.05.2008 at 07:19PM PDT, ID: 21504344

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.06.2008 at 07:27AM PDT, ID: 21507536

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.06.2008 at 09:36AM PDT, ID: 21508779

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.06.2008 at 03:58PM PDT, ID: 21511706

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.07.2008 at 08:46AM PDT, ID: 21517628

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: C# Programming Language, .NET
Tags: c#.Net
Sign Up Now!
Solution Provided By: tjw_bld
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628