472,378 Members | 1,230 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,378 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 2371
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.