473,320 Members | 1,921 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.

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
Nov 21 '05 #1
6 1040
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

Nov 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

Nov 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


Nov 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/>
Nov 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/>

Nov 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/>
Nov 21 '05 #7

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

Similar topics

5
by: John Dewbert | last post by:
*** post for FREE via your newsreader at post.newsfeed.com *** Hello, I have trouble passing a folder object (from a FileSystemObject) to a sub procedure. Consider the following code: ...
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...
5
by: Colleyville Alan | last post by:
I have a sub that can do two different tasks based on the value of one variable. So I'd like to have two different buttons on the same form run this, but each one setting a flag so that the...
6
by: lenny | last post by:
Hi, I've been trying to use a Sub or Function in VBA to connect to a database, make a query and return the recordset that results from the query. The connection to the database and the query...
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...
7
by: Doug | last post by:
An ASP.NET session cookie set on "www.mydomain.com" can not be accessed on "search.mydomain.com"; hence, a new session and cookie are being created on every sub-domain. This is occuring because...
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...
5
by: Sharon | last post by:
Hi all. To prevent access to a sub system internal types, is it necessary to create the sub system in a different project, and use the internal access level? Or is there another way that will...
6
by: Bob | last post by:
Hi, I found this code here below (about cartitems and shoppingcart) and I have two questions about sub New(). In the first class CartItem, there is two times sub New(): Public Sub New() End...
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...
0
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...
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...
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)...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.