473,786 Members | 2,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2446
On Fri, 01 Feb 2008 08:06:01 -0800, Tammy Nejadian
<Ta***********@ discussions.mic rosoft.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*********@nn owslpianmk.comw rote in message
news:op******** *******@petes-computer.local. ..
On Fri, 01 Feb 2008 08:06:01 -0800, Tammy Nejadian
<Ta***********@ discussions.mic rosoft.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
7158
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 Transitional, Encoding is utf-8 Is there anything wrong? Should I try something else? What in that case?
6
1911
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
7229
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 Sub sbTest() On Error GoTo errHandler Dim frm As Access.Form
25
10267
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 data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
11
1686
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 have one form that handles both adding a new record to the database and editing the same type of record. The form would be altered in the load event to change whatever needs to be changed to show the form in an "Add" mode vs. and "Edit" mode (I...
8
3590
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 picture box, lots of text boxes (for input).. you get the idea. All of a sudden everything on the form has disappeared, it looks like a blank, newly created form. I can still get to the properties of every item on the form using the drop-down box in...
12
2371
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 from the User Control in Form2 ? Hope this is clear enough...
7
4014
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 combination of the combo boxes, some might not be selected etc etc. ie they may want to select the area and ward to show on the report but not the case officer or the property type
5
3311
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 the forms all at once, I'm opening them as needed. I have a main form with multiple records; and then I have a pop-up form that the user opens with button. The pop-up form contains one record relating to the current record in the main form (but...
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10363
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9961
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7512
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4066
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.