Click here to Skip to main content
15,882,464 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

I'm new to c#. I'm using windows application using vs 2005. Can you suggest me a solution to "Display a child form that appears as dialogue only to its parent form "?
Posted
Updated 29-Dec-10 21:29pm
v2

1 solution

Hi,

ChildForm _ChildForm = New ChildForm()
_ChildForm.ShowDialogue ();
 
Share this answer
 
Comments
JF2015 30-Dec-10 3:44am    
Moved from answer:
Eins:
hai thank u for ur reply, But when i call showdialog it will appear permanently top of my application and prevnet from selection any other forms. I want that child form (B) appear top of only its parent from (A)., so that i could select any other form (C) with out closing the child form (B) and also it shouldn't appear infront of from (C). and agin when im select the form (A) then the child of should appear as the dialogue window to that from (A0
vivekse 30-Dec-10 4:02am    
Ok i got it.
You can do the following steps.

1. Use only show() instead of ShowDialogue();. But problem here it will not work as child form,it works as an independent form .
2. So maintain it by like this, on form Activated event activate child form form its object.
3. You have to also maintain only single instance of the child form. You can maintain this by like Singleton design pattern.

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