Re: Embedding form in a panel to allow form in non-child window area
From: Yasutaka Ito (nobody_at_nonexistent.com)
Date: 02/04/04
- Next message: Ja: "RE: Clear or Reset a DataGrid"
- Previous message: Miha Markic [MVP C#]: "Re: CSharp Compiler and interpretor"
- Maybe in reply to: Yasutaka Ito: "Embedding form in a panel to allow form in non-child window area"
- Messages sorted by: [ date ] [ thread ]
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>
- Next message: Ja: "RE: Clear or Reset a DataGrid"
- Previous message: Miha Markic [MVP C#]: "Re: CSharp Compiler and interpretor"
- Maybe in reply to: Yasutaka Ito: "Embedding form in a panel to allow form in non-child window area"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|