473,385 Members | 1,474 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,385 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 4478
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?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.