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

Sub-forms

Hi,

What is the best way to show a 'form' inside another form.
Or could I better use a user-control?

I currently don't want MDI, rather a wizard-style interface...

- Joris
Jul 21 '05 #1
6 1074
Joris,

You shouldn't use a form inside another form. This use of the forms
isn't really supported (in windows anywhere, for that matter).

You should use a user-control and place that where you want in your
form.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Joris Dobbelsteen" <RE********************@jAoris2k.aTth.cXx> wrote in
message news:41***********************@news.wanadoo.nl...
Hi,

What is the best way to show a 'form' inside another form.
Or could I better use a user-control?

I currently don't want MDI, rather a wizard-style interface...

- Joris

Jul 21 '05 #2
Hi,

You cannot have a form inside another form AFAIK in that way, so you will
have to use a UserControl.

Now I remember that sometime ago somebody posted an announcement of Wizard
generator, or Wizard framework.
I dont have the link though :(

so you better check this NG in google or maybe somebody will post the link
here :)

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Joris Dobbelsteen" <RE********************@jAoris2k.aTth.cXx> wrote in
message news:41***********************@news.wanadoo.nl...
Hi,

What is the best way to show a 'form' inside another form.
Or could I better use a user-control?

I currently don't want MDI, rather a wizard-style interface...

- Joris

Jul 21 '05 #3
My expectation,

Thanks...

- Joris

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:ep**************@TK2MSFTNGP10.phx.gbl...
Joris,

You shouldn't use a form inside another form. This use of the forms
isn't really supported (in windows anywhere, for that matter).

You should use a user-control and place that where you want in your
form.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Joris Dobbelsteen" <RE********************@jAoris2k.aTth.cXx> wrote in
message news:41***********************@news.wanadoo.nl...
Hi,

What is the best way to show a 'form' inside another form.
Or could I better use a user-control?

I currently don't want MDI, rather a wizard-style interface...

- Joris


Jul 21 '05 #4
* "Joris Dobbelsteen" <RE********************@jAoris2k.aTth.cXx> scripsit:
What is the best way to show a 'form' inside another form.
Or could I better use a user-control?


If you don't need a special border around the form and the form doesn't
need to be moveable, usercontrols are a good approach.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Jul 21 '05 #5
User control's can have borders, caption's, etc as well. When set Form's
TopLevel property to false actully what is done is to use WS_CHILD style for
the form. In other words it becomes control rather than form. So by
overriding CreateParams property and add all the WS_* styles for captions,
borders and so on any controls can behave in the same way as
form-inside-another-form does.

--

Stoitcho Goutsev (100) [C# MVP]
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2o************@uni-berlin.de...
* "Joris Dobbelsteen" <RE********************@jAoris2k.aTth.cXx> scripsit:
What is the best way to show a 'form' inside another form.
Or could I better use a user-control?


If you don't need a special border around the form and the form doesn't
need to be moveable, usercontrols are a good approach.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Jul 21 '05 #6
* "Stoitcho Goutsev \(100\) [C# MVP]" <10*@100.com> scripsit:
User control's can have borders, caption's, etc as well. When set Form's
TopLevel property to false actully what is done is to use WS_CHILD style for
the form. In other words it becomes control rather than form. So by
overriding CreateParams property and add all the WS_* styles for captions,
borders and so on any controls can behave in the same way as
form-inside-another-form does.


OK, that would work.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Jul 21 '05 #7

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

Similar topics

2
by: tshad | last post by:
I have an example I copied from "programming asp.net" (o'reilly) and can't seem to get the Sub (writefile) to execute. It displays all the response.write lines that are called directly, but not...
3
by: Kathy Burke | last post by:
Hi, I'm tired, so this question may be silly. I have a fairly long sub procedure. Based on one condition, I load another sub with the following: If Session("GRN") = "complete" Then txtScan.Text...
9
by: tshad | last post by:
I have an example I copied from "programming asp.net" (o'reilly) and can't seem to get the Sub (writefile) to execute. It displays all the response.write lines that are called directly, but not...
10
by: tmaster | last post by:
When I try to dynamically add a second sub menu item to this ContextMenu item, I get an error 'Specified argument was out of the range of valid values'. Private Sub mnuTopics_Show_Select(ByVal...
12
by: Ron | last post by:
Greetings, I am trying to understand the rational for Raising Events instead of just calling a sub. Could someone explain the difference between the following 2 scenarios? Why would I want to...
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
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: 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
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
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...
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.