473,378 Members | 1,401 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,378 software developers and data experts.

form inside a form

I have two windows forms in an application. I want one form to be embedded
into the other. How can this be done? Can I do something like:

Form1.Controls.Add(Form2);

Thanks.
Jess
Feb 15 '06 #1
3 2900
You can go the MDI route if that makes sense in your application - you have
a main Form that hosts multiple "documents". Otherwise, literally embedded a
Form onto another Form as if it were a control can be done; however, are you
sure you don't want to build a container control, like a UserControl, and
then place instances of this control on the Form?
http://groups.google.com/group/micro...75d20fdf3ce25b

--
Tim Wilson
..NET Compact Framework MVP

"Jessica Weiner" <je*****@gmail.com> wrote in message
news:mj*******************@newssvr11.news.prodigy. com...
I have two windows forms in an application. I want one form to be embedded
into the other. How can this be done? Can I do something like:

Form1.Controls.Add(Form2);

Thanks.
Jess

Feb 15 '06 #2
Tim Wilson wrote:
You can go the MDI route if that makes sense in your application -
you have a main Form that hosts multiple "documents". Otherwise,
literally embedded a Form onto another Form as if it were a control
can be done; however, are you sure you don't want to build a
container control, like a UserControl, and then place instances of
this control on the Form?


I looked into Mdi and it was exactly what I needed. Thanks, that was very
helpful.

Jess
Feb 15 '06 #3
Hi,

"Jessica Weiner" <je*****@gmail.com> wrote in message
news:%k*******************@newssvr29.news.prodigy. net...
Tim Wilson wrote:
You can go the MDI route if that makes sense in your application -
you have a main Form that hosts multiple "documents". Otherwise,
literally embedded a Form onto another Form as if it were a control
can be done; however, are you sure you don't want to build a
container control, like a UserControl, and then place instances of
this control on the Form?


I looked into Mdi and it was exactly what I needed. Thanks, that was very
helpful.


Note that MDI is intended for a window to "potentially" contain more than
one window, if you always will have a single window inside you would go
better transforming the second form in a usercontrol or a panel

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 15 '06 #4

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

Similar topics

8
by: L Major | last post by:
Hi Unfortunately, I am limited to using tables for part of my current project. I have a form that spans across a number of TR and TD in the shape of checkboxes. Doctype is XHTML 1.0...
2
by: Asad | last post by:
I have a form on a page that has several textareas, and textboxes inside a table (so the table containing the textboxes is also inside the FORM tag). I want to replace the textareas with simple...
1
by: ray well | last post by:
hi, i need to preview the keys in my app in order to process F1-F10. i set keypreview of my form to true, and it does capture the keystrokes from all over the forms controls which i then...
4
by: athlonman | last post by:
Hi all!! II'm trying to set the Text of a TextBox in "Form1" when I click a Button in a UserControl. My code is: : public class Form1 : System.Windows.Forms.Form { public...
3
by: Roger | last post by:
Hi In a Windows forms application I have 2 forms A and B; Form B inherits from form A. Form A is never displayed and its only purpose is to be inherited from and therefore contains mostly...
4
by: Matthew Louden | last post by:
It happend to me more than once. When I create web controls or move the positions in VS.NET, I encountered the following run-time errors: It doesn't matter what controls I create, the following...
2
by: Neo Geshel | last post by:
After pouring over about a dozen sites that clearly dealt with ClientID all by itself, I came to the realization that about 2/3+ of them were doing it wrong. It is indeed impossible to grab the...
19
by: hamil | last post by:
I have a form with one button, Button1, and a Textbox, Textbox1 I have a class, class1 as follows. Public Class Class1 Public DeForm As Object Sub doit() DeForm.Textbox1.text = "It works"...
4
by: Daniel R. Rossnagel | last post by:
As I can hide the bar of I title of a window daughter maximized within form MDI Already I have proven with different types from borders, hiding thebuttons to maximize, to diminish and control box,...
4
by: Alex Maghen | last post by:
I have a master page which contains a general page framework and also contains a <form runat=server> around most of the content of the page. Inside that <form> tag is a ContentPlaceholder. I...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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.