Multiple screens in the same application:

M

Matt C.

I've got an application that has several distinct purposes. I'd like to
make these available as different screens that the user can switch between
within a single form, using commands from the main Menu. (The "primary"
form serves only as a container for the Menu and the other screens.)

In VB 6, I was able to get a nice expression of this by using always-
maximized MDI children inside an MDI parent. Unfortunately, I don't seem to
have the same level of control over MDI children in .NET; they're
occasionally reverting to Normal status rather than Maximized no matter
what I do. Google didn't suggest any easy fixes here.

I am experimenting with UserControls instead. Using a UserControl with
..Dock = DockStyle.Fill seems to give an OK effect. I'm a little worried
that I'm going to give up important functionality with this approach that I
won't realize until later, though.

I can't be the only one who wants to switch the user view from one screen to
another inside a parent-type form. Is there a preferred approach to doing
this in .NET?

Suggestions appreciated.

Matt
 
M

Matt C.

Matt,

Real strange that you did not find something on Google.
http://groups-beta.google.com/group/microsoft.public.dotnet.languages.vb
/msg/e8d66101d43e80e3

I thought that this was one of those I have done as answer for your
problem.

I hope this helps,

I was shying away from solutions involving repeated resettings of
..Maximized, because I had seen others complain about slow responsiveness and
screen flicker. But I should probably give it a chance and see for myself.

At any rate, I appreciate the suggestion. Thanks.

Matt
 
C

Chris Dunaway

An alternative might be to use a panel on the main form as the
container and then use regular forms for each "screen".

You would instantiate the form, set the TopLevel property to False and
then set their parent property to the panel.

I used a form with no border or caption and then called it's Show
method. It is then visible inside the panel.

Perhaps this simple method will be of use to you?

Chris
 
M

Matt C.

An alternative might be to use a panel on the main form as the
container and then use regular forms for each "screen".

You would instantiate the form, set the TopLevel property to False and
then set their parent property to the panel.

I used a form with no border or caption and then called it's Show
method. It is then visible inside the panel.

Perhaps this simple method will be of use to you?

Sounds promising, at any rate. Simple is best, as long as it works.

I'll try it out. Thanks for the suggestion.

Matt
 
M

Matt C.

An alternative might be to use a panel on the main form as the
container and then use regular forms for each "screen".

You would instantiate the form, set the TopLevel property to False and
then set their parent property to the panel.

I used a form with no border or caption and then called it's Show
method. It is then visible inside the panel.

Perhaps this simple method will be of use to you?

I played around with this approach today and it is working nicely. Thanks
again for the suggestion.

Also, inherited forms are way cool. That is all.

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top