473,320 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

Hi,

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?
These days many programs like Visual Studio .NET IDE, have a docking window
or tabbed window, but I wonder what's the trick behind that?

Would appreciate any input suggestions you may.

thanks!
-Yasutaka

Jul 21 '05 #1
1 4473
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]" <hi***************@gmx.at> wrote in message
news:us**************@TK2MSFTNGP10.phx.gbl...
* "Yasutaka Ito" <no****@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>


Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Martin | last post by:
Greetings, I am new to python and wish to embed python in an 3D graphics application to provide application automation. The high level goal is to be able to drive my app from a script for batch...
4
by: Dino M. Buljubasic | last post by:
I have a form and a panel on the form that holds 24 user controls each one representing an hour (0 - 23). The panel is completelly covered with the user controls. I need to be able to select...
0
by: hq4000 | last post by:
Given AStyleSheet.xsl : <AStyleSheet> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.mytest.mytest2.mytest3.com" version="1.0"> <xsl:output method="xml"...
2
by: Baliga, Narasimha | last post by:
Hi, I am trying to write an app which will have say a MainForm that has a TreeView and a Panel control on it. The project also has 2 other forms. Now the TreeView would have 2 nodes...
1
by: NumberCruncher | last post by:
Hi All, I am struggling with setting up my first system of tables, forms,and reports, and could use your help! I am setting up a database to keep track of the production of a produced item. The...
0
by: Rob | last post by:
I've created an application which is intended to allow users to draw a diagram of a network - with workstations, servers, switches, links (all devices in my language) etc. I've created a user...
2
by: AlecL | last post by:
I have a page that has about 5 or 6 user controls ranging from hearders to footers to ad space but when I add a new user control which is a form it gives me the exception "page can have only one...
0
by: Soren | last post by:
Hi, I'm trying to create a small GUI program where I can do plots using Matplotlib. I've been trying to borrow code from the examples at the matplotlib website, but I can't get it to work. I...
0
by: Soren | last post by:
Hi, I've been trying to embed matplotlib in wxpython. I want to be able to put a figure (axes) in a wx.Panel and place it somewhere in my GUI. The GUI should have other panels with buttons etc....
13
by: dancer | last post by:
I have created a form in ASP.NET. Now how do I get the results on another page (a pretty one) and email to myself?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.