Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

mdi child of a child

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
oscar - 19 Apr 2005 15:58 GMT
how do you make all child forms part of the container?

the container opens the form and it is a child (stays withing the container)
but when the child opens a form it is free floating.  is there a way to make
the child's child stay within the container?
Herfried K. Wagner [MVP] - 19 Apr 2005 17:21 GMT
"oscar" <oscar@discussions.microsoft.com> schrieb:
> how do you make all child forms part of the container?
>
[quoted text clipped - 3 lines]
> make
> the child's child stay within the container?

\\\
Dim f As New FooForm()
f.MdiParent = Me.MdiParent
f.Show()
///

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>

oscar - 19 Apr 2005 19:30 GMT
i forgot to put in that the form is being called as a frm.ShowDialog();

how do i make these forms part of the container form?

using:
frm.MdiParent = this.MdiParent;
frm.ShowDialog();

does not work, i get:
"Forms that are not top level forms cannot be displayed as a modal dialog.
Remove the form from any parent form before calling showDialog."

is there still a way to keep it in the container form?
Herfried K. Wagner [MVP] - 19 Apr 2005 20:01 GMT
"oscar" <oscar@discussions.microsoft.com> schrieb:
> i forgot to put in that the form is being called as a frm.ShowDialog();
>
> how do i make these forms part of the container form?

That's not supported.  MDI children represent a set of documents, so there
is no way to show one of them modally.  I suggest to show the form modally
to the MDI container.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>

oscar - 19 Apr 2005 20:12 GMT
is there an easy way to simulate them being showdialog?

so they're always on top of their parent form but you can still interact
with the rest of the program?
oscar - 19 Apr 2005 20:13 GMT
is there a way to simulate it?

easiest way to keep the child form on top of the form it came from but a
user can still interact with the rest of the program?

> "oscar" <oscar@discussions.microsoft.com> schrieb:
> > i forgot to put in that the form is being called as a frm.ShowDialog();
[quoted text clipped - 4 lines]
> is no way to show one of them modally.  I suggest to show the form modally
> to the MDI container.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.