473,397 Members | 1,960 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,397 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 1076
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.