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

Switching Windows Forms

Hi -

I'm writing a C# windows form application and have hit a hurdle. The
application has several panels that need to be displayed at various times
depending on what the user is doing. They all need to sit inside a main
frame (form). The various screens could be:

1. Side bar and welcome screen.
2. Side bar and list of items.
3. Item side bar and tab sheet.
4. More variations on 3 replacing the tab sheet etc. etc.

The sidebar will vary depending on what stage the user is at. The other
views will have controls placed on them (i.e. controls on the tab sheet
etc.). The problem I have is how to make the side bar and work panels
dynamic (i.e. to change the state easily to reflect the current mode of the
application). The main problems are:

1. Can I use the IDE to achieve the above or do I need to create the views
by hand? If so how...
2. Do I need to create the various views as separate panels and associate
them with the main form? Can I use the IDE for this and what type should
they be created as?

TIA

- Andy
Nov 16 '05 #1
1 1814
"Andy Bates" <An****@freezone.co.uk> wrote:
The application has several panels that need to be
displayed at various times depending on what the
user is doing.
[...]
The problem I have is how to make the side bar
and work panels dynamic (i.e. to change the state
easily to reflect the current mode of the application).


I think I'd create the individual panels as UserControls. These are
custom controls that you create yourself (like "miniature forms" that
can contain many components). You can then either drag them all onto
your form and make only one visible at a time, or create them in code
with something like:

MyUserControl uc = new MyUserControl();
thePanel.Controls.Add(uc); // put the control on the form
// ... set its size, position, etc.

P.
Nov 16 '05 #2

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

Similar topics

8
by: Emily Jones | last post by:
Very strange one this. Application written in Access 2000. Runs in 2003 at client's site, 2000 on my development system. FE/BE system. The app's startup form sets a few options, opens the...
5
by: Jacques Cooper | last post by:
Hello, We developed a C# application. How do you changes views within the same application window? With VC++ you changes views within the same window with the SwitchView method. TIA,
3
by: Leslie | last post by:
To switch between the child forms in an MDI app, you can use ctrl-tab. I want to eliminate that option. I don't want to let the users switch between the children. I tried using KeyPress and...
2
by: Johann Blake | last post by:
The following is a bug I have discovered using tab pages and threads and I am looking for a workaround. Create a new Windows Forms application and add a tab control with two tab pages. Add a...
8
by: Max | last post by:
My client has decided to use the Euro for the entire web site. Is there an easy way to get my ASP.NET app to format currency to Euro instead of US-dollar? Right now it's just reading the server...
4
by: Jeremy Holt | last post by:
Hi, In a windows.forms application I would BeginInvoke a delegate on the UI thread to collect data from a database. When the call returns to the AsyncCallback, if the Control.InvokeRequired =...
1
by: Bernie Yaeger | last post by:
I have an mdi container that is opened max. Inside can be zero or dozens of child forms. One of the forms - my reporttree - is to be opened normal; all others maximized. When you have the...
3
by: Simon Verona | last post by:
I have a parent form which contains a toolbar. The toolbar controls the loading and switching to of MDI child forms. The code for the toolbar click event and one of the subroutines that loads...
1
by: SamSpide | last post by:
Hi all, I have a moderate-side 'Windows Form Application' (C++) project, with several forms. For some reason switching between code & designer views (right-click ;view code' or 'view...
4
by: K Viltersten | last post by:
We have a project working well today and it's developed on VS2005. Since we're planing to switch to VS2008 in a soon future, i've been trying to move the project to VS2008 Express (Web...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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
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
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...

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.