Re: Embedding form in a panel to allow form in non-child window area

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Yasutaka Ito (nobody_at_nonexistent.com)
Date: 02/04/04


Date: Wed, 4 Feb 2004 22:28:06 +0530

The code I gave run, though...
I'll still give a try of the way you suggested.

But, isn't there better way than to embed in panel?

thanks!
-Yasutaka

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:usO$w4z6DHA.2480@TK2MSFTNGP10.phx.gbl...
> * "Yasutaka Ito" <nobody@nonexistent.com> scripsit:
> > I have an MDI application, in which I want to embed one form
> > (System.Windows.Forms.Form) into a specified area of my MDI application.
> > This is, wihtout affecting the capability of other child forms opening.
> >
> > Currently, I'm achieving this by...
> > 1) place a panel on an mdi container form, setting its Dock to Top
> > 2) have following code to embed a form into this panel (crazy, ha?)
> >
> > // FormToEmbed is of type System.Windows.Forms.Form
> > FormToEmbed form = new FormToEmbed;
> > form.FormBorderStyle = FormBorderStyle.None;
> > form.MaximizeBox = false;
> > form.MinimizeBox = false;
> > form.ControlBox = false;
> > form.MdiParent = this;
> > form.Parent = this.panel1
> > form.Show();
> >
> > I have a strong feeling that this is too crude... is there any better
way
> > that you suggest?
>
> You cannot embed an MDI child in a panel on the MDI parent. You can set
> the form's 'TopLevel' property to false and then add it to the panel's
> 'Controls' collection.
>
> --
> Herfried K. Wagner [MVP]
> <http://www.mvps.org/dotnet>



Relevant Pages

  • Re: Embedding form in a panel to allow form in non-child window area
    ... > You cannot embed an MDI child in a panel on the MDI parent. ... > 'Controls' collection. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: MDI problem
    ... MonthCalendar, Clock, or just Panel. ... Child Form lays UNDER that Calendar, ... I don't know of any way that you can use the client area of an MDI ...
    (alt.comp.lang.borland-delphi)
  • Re: CORRECTION: Bridgeport Series1 Boss4 Powerup
    ... I got all three axes to move, increment, jog, etc. ... so something else thru the panel? ... I saw the machine running and making parts the day before the relocation. ... > I should be able to do a sequence on the MDI to fast travel the table in x ...
    (alt.machines.cnc)
  • Weird VB MDI Child Form - and fix.
    ... Something I have run into using VB Express 2005 with mdi forms. ... have a panel docked, and on the left hand side of the form I have a panel ... WindowState = Maximized of the form designer. ... I have tried to create a new solution, and tried to re-create this and could ...
    (microsoft.public.dotnet.languages.vb)
  • Re: MDI Child
    ... > ich habe schon wieder ein Problem mit den MDI Childs. ... > Auf den Kindfenstern ist am unteren Bereich ein Panel ... > Wird das Kindfenster geöffnet ist der Button nur zur Hälfte sichtbar. ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)