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

Use one form instead of multiple forms

Hi, I am going to write a large application using Visual Studio C#. I am
going to use only one Form as main menu and go to other pages by cliking on
next button in each page. I dont want to create several forms and move from
one form to next. However I need to have same action using only one form.
Could someone show me how I can use only one form instead of multiple forms.

Thanks
--
Nejadian
Feb 1 '08 #1
2 2424
On Fri, 01 Feb 2008 08:06:01 -0800, Tammy Nejadian
<Ta***********@discussions.microsoft.comwrote:
Hi, I am going to write a large application using Visual Studio C#. I am
going to use only one Form as main menu and go to other pages by cliking
on
next button in each page. I dont want to create several forms and move
from
one form to next. However I need to have same action using only one form.
Could someone show me how I can use only one form instead of multiple
forms.
I don't really understand why you don't want to have multiple forms.
There's no obvious reason that shouldn't work well for the scenario you
describe.

That said, an alternative would be to compose each page in a UserControl,
then put all the UserControls into the same Form, all in the same place.
Then control which UserControl is visible according to the buttons the
user pushes (starting out with the first page's UserControl being the only
one visible when you create the Form).

Pete
Feb 1 '08 #2
Yes I concure Dynamically is the only way (creating buttons, etc. as you
go). But for my 2 cents and from experience the coding adds up very quickly
and you end up fighting your code to figure out where you are in your
program, lol.

Cheers

"Peter Duniho" <Np*********@nnowslpianmk.comwrote in message
news:op***************@petes-computer.local...
On Fri, 01 Feb 2008 08:06:01 -0800, Tammy Nejadian
<Ta***********@discussions.microsoft.comwrote:
>Hi, I am going to write a large application using Visual Studio C#. I am
going to use only one Form as main menu and go to other pages by cliking
on
next button in each page. I dont want to create several forms and move
from
one form to next. However I need to have same action using only one form.
Could someone show me how I can use only one form instead of multiple
forms.

I don't really understand why you don't want to have multiple forms.
There's no obvious reason that shouldn't work well for the scenario you
describe.

That said, an alternative would be to compose each page in a UserControl,
then put all the UserControls into the same Form, all in the same place.
Then control which UserControl is visible according to the buttons the
user pushes (starting out with the first page's UserControl being the only
one visible when you create the Form).

Pete

Feb 1 '08 #3

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...
6
by: Bob | last post by:
Declaring a module level form object in multiple froms within a project to show another project form causes a stack overflow and other assorted errors. Can anyone help?
7
by: a s i l b a . p t | last post by:
Can someone please explain why the following code raises error 2450?... Note: frmTest is a simple form with code behind form so it can be instantiated through the form's class module. Public...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
11
by: Johnny M | last post by:
I have several databases where I have one form to add a new record and one form to edit an existing record. I use unbound forms and class modules most of the time. What I would like to do is...
8
by: Ryan | last post by:
Ok.. I have a form with lots of stuff on it; a tool strip panel, menu strip, data binding elements (dataset, binding source, table adapter), tab control with 7 tab pages, each page contains a...
12
by: Rob | last post by:
Let's say you open Form1 that contains TabControl1 There are several tabs on TabControl1 Now you open a new Form2 that contains a User Control How can you determine the Selected tab in Form1...
7
by: Ceebaby via AccessMonster.com | last post by:
Hi All Here's hoping someone can help me with this. I have a report based on a query where the criteria for 4 of the fields is set from an unbound form. I want the user to be able to select any...
5
by: Neil | last post by:
"lyle" <lyle.fairfield@gmail.comwrote in message news:48c3dde7-07bd-48b8-91c3-e157b703f92b@f3g2000hsg.googlegroups.com... Question for you. I'm doing something similar, only, instead of opening...
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: 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
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?
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.