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

MDI Forms

How do you maximize a child form when you show the child form. My
resolution on my screen is 1440 x 900. My parent form maximizes just fine,
but when I show a child form it doesn't maximize. It doesn't separate
itself from the child form, meaning you can't move it around like if the
form was "restored" but it doesn't take up all the space available.

I do not have the maximum or minimum size set in the properties, but I do
have the WindowState set to Maximized. I also have the size property set to
800 x 600 and that is the size that the form starts up as.

Any answers would be greatly appreciated.

Thanks, Tony

Dec 19 '06 #1
8 1993
This happend to me....
Are you using the Property to maximize? or doing it by code?

If you notice, it is actually showing you the form the exact size it is in
development mode.

Try to show the form maximized thru code

fMain = New frmMain
fMain.WindowState = FormWindowState.Maximized
fMain.Show()
and leave the windowstate "Normal" on the property of the form.

Compile...
it should work,

Now if you get rid of the code, and change your property back to show
"maximized" it should work.

After I ran into this...i always show all my forms maximized thru code (
like above ) and leave all my forms "Normal", and it has never happend
since.
Lemmi know if this fixed you as well. Im sure others will run into this
too.

Miro
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:54**********************************@microsof t.com...
How do you maximize a child form when you show the child form. My
resolution on my screen is 1440 x 900. My parent form maximizes just
fine, but when I show a child form it doesn't maximize. It doesn't
separate itself from the child form, meaning you can't move it around like
if the form was "restored" but it doesn't take up all the space available.

I do not have the maximum or minimum size set in the properties, but I do
have the WindowState set to Maximized. I also have the size property set
to 800 x 600 and that is the size that the form starts up as.

Any answers would be greatly appreciated.

Thanks, Tony

Dec 20 '06 #2
You are the MAN!! Thank you Miro. I have struggled with this on other MDI
apps and went about it a much LONGER way. Thanks again.

Tony

"Miro" <mi******@golden.netwrote in message
news:uB**************@TK2MSFTNGP03.phx.gbl...
This happend to me....
Are you using the Property to maximize? or doing it by code?

If you notice, it is actually showing you the form the exact size it is in
development mode.

Try to show the form maximized thru code

fMain = New frmMain
fMain.WindowState = FormWindowState.Maximized
fMain.Show()
and leave the windowstate "Normal" on the property of the form.

Compile...
it should work,

Now if you get rid of the code, and change your property back to show
"maximized" it should work.

After I ran into this...i always show all my forms maximized thru code (
like above ) and leave all my forms "Normal", and it has never happend
since.
Lemmi know if this fixed you as well. Im sure others will run into this
too.

Miro
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:54**********************************@microsof t.com...
>How do you maximize a child form when you show the child form. My
resolution on my screen is 1440 x 900. My parent form maximizes just
fine, but when I show a child form it doesn't maximize. It doesn't
separate itself from the child form, meaning you can't move it around
like if the form was "restored" but it doesn't take up all the space
available.

I do not have the maximum or minimum size set in the properties, but I do
have the WindowState set to Maximized. I also have the size property set
to 800 x 600 and that is the size that the form starts up as.

Any answers would be greatly appreciated.

Thanks, Tony

Dec 20 '06 #3
Look down the list of posts to My.Application.OpenForms on 14th Dec to see
some material about resizing MDI children etc.
Stephanie showd me how to do it and leaving a MDI child maximised does not
utilize the facilities available for an MDI application.
The user cannot resize the forms to show them side by side if they are
maximised - if he wants to.
He may not even realise that there are other MDI children displayed 'under'
the one he is looking at.
My problem was to generate the MDI child so that it filled the available
space without being docked or maximised.

Garry
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:8E**********************************@microsof t.com...
You are the MAN!! Thank you Miro. I have struggled with this on other
MDI apps and went about it a much LONGER way. Thanks again.

Tony

"Miro" <mi******@golden.netwrote in message
news:uB**************@TK2MSFTNGP03.phx.gbl...
>This happend to me....
Are you using the Property to maximize? or doing it by code?

If you notice, it is actually showing you the form the exact size it is
in development mode.

Try to show the form maximized thru code

fMain = New frmMain
fMain.WindowState = FormWindowState.Maximized
fMain.Show()
and leave the windowstate "Normal" on the property of the form.

Compile...
it should work,

Now if you get rid of the code, and change your property back to show
"maximized" it should work.

After I ran into this...i always show all my forms maximized thru code
( like above ) and leave all my forms "Normal", and it has never happend
since.
Lemmi know if this fixed you as well. Im sure others will run into this
too.

Miro
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:54**********************************@microso ft.com...
>>How do you maximize a child form when you show the child form. My
resolution on my screen is 1440 x 900. My parent form maximizes just
fine, but when I show a child form it doesn't maximize. It doesn't
separate itself from the child form, meaning you can't move it around
like if the form was "restored" but it doesn't take up all the space
available.

I do not have the maximum or minimum size set in the properties, but I
do have the WindowState set to Maximized. I also have the size property
set to 800 x 600 and that is the size that the form starts up as.

Any answers would be greatly appreciated.

Thanks, Tony


Dec 20 '06 #4
A soon as I seen your question, I realized you had the same nightmare I ran
into.

I am slowely teaching myself VB.net and I - for the life of me, couldnt
figure out what I had done wrong. Seems it wasnt me at all !!! :-)

I am not sure if the same thing happens on non "MDI" apps, but I dont risk
it anymore. I keep all my apps as "Normal", and
set it during code at runtime.

Glad to be of help.
Cheers

Miro
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:8E**********************************@microsof t.com...
You are the MAN!! Thank you Miro. I have struggled with this on other
MDI apps and went about it a much LONGER way. Thanks again.

Tony

"Miro" <mi******@golden.netwrote in message
news:uB**************@TK2MSFTNGP03.phx.gbl...
>This happend to me....
Are you using the Property to maximize? or doing it by code?

If you notice, it is actually showing you the form the exact size it is
in development mode.

Try to show the form maximized thru code

fMain = New frmMain
fMain.WindowState = FormWindowState.Maximized
fMain.Show()
and leave the windowstate "Normal" on the property of the form.

Compile...
it should work,

Now if you get rid of the code, and change your property back to show
"maximized" it should work.

After I ran into this...i always show all my forms maximized thru code
( like above ) and leave all my forms "Normal", and it has never happend
since.
Lemmi know if this fixed you as well. Im sure others will run into this
too.

Miro
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:54**********************************@microso ft.com...
>>How do you maximize a child form when you show the child form. My
resolution on my screen is 1440 x 900. My parent form maximizes just
fine, but when I show a child form it doesn't maximize. It doesn't
separate itself from the child form, meaning you can't move it around
like if the form was "restored" but it doesn't take up all the space
available.

I do not have the maximum or minimum size set in the properties, but I
do have the WindowState set to Maximized. I also have the size property
set to 800 x 600 and that is the size that the form starts up as.

Any answers would be greatly appreciated.

Thanks, Tony


Dec 20 '06 #5
This is fine, but that is not what actually happens in this 'bug'.

What will happen, is that your form will show in your MDI as "Normal" but it
is actually 'Maximized'.
Very hard to explain. You will see the other forms underneith it, but you
wont be able to click on them, until you actually re-click on the maximize
button on the form you displayed and then unmaximize it.

I understand your "window example", but I ran into this trying to create an
app that looked like "Quickbooks" where I handle all the windows, but they
are always all in maximized Mode.

Miro
"Garry" <ga**********@gmail.comwrote in message
news:er**************@TK2MSFTNGP06.phx.gbl...
Look down the list of posts to My.Application.OpenForms on 14th Dec to see
some material about resizing MDI children etc.
Stephanie showd me how to do it and leaving a MDI child maximised does not
utilize the facilities available for an MDI application.
The user cannot resize the forms to show them side by side if they are
maximised - if he wants to.
He may not even realise that there are other MDI children displayed
'under' the one he is looking at.
My problem was to generate the MDI child so that it filled the available
space without being docked or maximised.

Garry
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:8E**********************************@microsof t.com...
>You are the MAN!! Thank you Miro. I have struggled with this on other
MDI apps and went about it a much LONGER way. Thanks again.

Tony

"Miro" <mi******@golden.netwrote in message
news:uB**************@TK2MSFTNGP03.phx.gbl...
>>This happend to me....
Are you using the Property to maximize? or doing it by code?

If you notice, it is actually showing you the form the exact size it is
in development mode.

Try to show the form maximized thru code

fMain = New frmMain
fMain.WindowState = FormWindowState.Maximized
fMain.Show()
and leave the windowstate "Normal" on the property of the form.

Compile...
it should work,

Now if you get rid of the code, and change your property back to show
"maximized" it should work.

After I ran into this...i always show all my forms maximized thru code
( like above ) and leave all my forms "Normal", and it has never happend
since.
Lemmi know if this fixed you as well. Im sure others will run into this
too.

Miro
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:54**********************************@micros oft.com...
How do you maximize a child form when you show the child form. My
resolution on my screen is 1440 x 900. My parent form maximizes just
fine, but when I show a child form it doesn't maximize. It doesn't
separate itself from the child form, meaning you can't move it around
like if the form was "restored" but it doesn't take up all the space
available.

I do not have the maximum or minimum size set in the properties, but I
do have the WindowState set to Maximized. I also have the size
property set to 800 x 600 and that is the size that the form starts up
as.

Any answers would be greatly appreciated.

Thanks, Tony



Dec 20 '06 #6
Miro,

If you are answering me then the MDI children that I generate are free to
move as the user may wish.
It is just that my initial condition on child form generation was to fill
the available area in the MDI parent form and it was very difficult to find
the correct width and height before the form is shown without causing the
'ClientRectangle' to display scroll bars at the side of the parent and in
some cases, cascade multiple forms.
My MDIChild forms now behave exactly as I want and they are not maximised
and do not appear anywhere as maximised. But, they are maximisable.
However, it was much simpler in VB6. I have had to repeat this a lot
recently.
So much for the vaunted 'You write less code in VB2005'.

Garry

"Miro" <mi******@golden.netwrote in message
news:ex**************@TK2MSFTNGP04.phx.gbl...
This is fine, but that is not what actually happens in this 'bug'.

What will happen, is that your form will show in your MDI as "Normal" but
it is actually 'Maximized'.
Very hard to explain. You will see the other forms underneith it, but you
wont be able to click on them, until you actually re-click on the maximize
button on the form you displayed and then unmaximize it.

I understand your "window example", but I ran into this trying to create
an app that looked like "Quickbooks" where I handle all the windows, but
they are always all in maximized Mode.

Miro
"Garry" <ga**********@gmail.comwrote in message
news:er**************@TK2MSFTNGP06.phx.gbl...
>Look down the list of posts to My.Application.OpenForms on 14th Dec to
see some material about resizing MDI children etc.
Stephanie showd me how to do it and leaving a MDI child maximised does
not utilize the facilities available for an MDI application.
The user cannot resize the forms to show them side by side if they are
maximised - if he wants to.
He may not even realise that there are other MDI children displayed
'under' the one he is looking at.
My problem was to generate the MDI child so that it filled the available
space without being docked or maximised.

Garry
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:8E**********************************@microso ft.com...
>>You are the MAN!! Thank you Miro. I have struggled with this on other
MDI apps and went about it a much LONGER way. Thanks again.

Tony

"Miro" <mi******@golden.netwrote in message
news:uB**************@TK2MSFTNGP03.phx.gbl...
This happend to me....
Are you using the Property to maximize? or doing it by code?

If you notice, it is actually showing you the form the exact size it is
in development mode.

Try to show the form maximized thru code

fMain = New frmMain
fMain.WindowState = FormWindowState.Maximized
fMain.Show()
and leave the windowstate "Normal" on the property of the form.

Compile...
it should work,

Now if you get rid of the code, and change your property back to show
"maximized" it should work.

After I ran into this...i always show all my forms maximized thru code
( like above ) and leave all my forms "Normal", and it has never
happend since.
Lemmi know if this fixed you as well. Im sure others will run into
this too.

Miro
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:54**********************************@micro soft.com...
How do you maximize a child form when you show the child form. My
resolution on my screen is 1440 x 900. My parent form maximizes just
fine, but when I show a child form it doesn't maximize. It doesn't
separate itself from the child form, meaning you can't move it around
like if the form was "restored" but it doesn't take up all the space
available.
>
I do not have the maximum or minimum size set in the properties, but I
do have the WindowState set to Maximized. I also have the size
property set to 800 x 600 and that is the size that the form starts up
as.
>
Any answers would be greatly appreciated.
>
Thanks, Tony



Dec 20 '06 #7
Sorry,
I was replying to this portion:
>The user cannot resize the forms to show them side by side if they are
maximised - if he wants to.
He may not even realise that there are other MDI children displayed
'under' the one he is looking at.
and did not fully read this portoin:
>My problem was to generate the MDI child so that it filled the available
space without being docked or maximised.
The issue Tony K ran into is when you want to display the initial form
Maximized off the start.
It works, it works, it works and then suddenly one compile it stops working
and does the "described" funny stuff.

Sorry,

Miro

"Garry" <ga**********@gmail.comwrote in message
news:OO**************@TK2MSFTNGP02.phx.gbl...
Miro,

If you are answering me then the MDI children that I generate are free to
move as the user may wish.
It is just that my initial condition on child form generation was to fill
the available area in the MDI parent form and it was very difficult to
find the correct width and height before the form is shown without causing
the 'ClientRectangle' to display scroll bars at the side of the parent and
in some cases, cascade multiple forms.
My MDIChild forms now behave exactly as I want and they are not maximised
and do not appear anywhere as maximised. But, they are maximisable.
However, it was much simpler in VB6. I have had to repeat this a lot
recently.
So much for the vaunted 'You write less code in VB2005'.

Garry

"Miro" <mi******@golden.netwrote in message
news:ex**************@TK2MSFTNGP04.phx.gbl...
>This is fine, but that is not what actually happens in this 'bug'.

What will happen, is that your form will show in your MDI as "Normal" but
it is actually 'Maximized'.
Very hard to explain. You will see the other forms underneith it, but
you wont be able to click on them, until you actually re-click on the
maximize button on the form you displayed and then unmaximize it.

I understand your "window example", but I ran into this trying to create
an app that looked like "Quickbooks" where I handle all the windows, but
they are always all in maximized Mode.

Miro
"Garry" <ga**********@gmail.comwrote in message
news:er**************@TK2MSFTNGP06.phx.gbl...
>>Look down the list of posts to My.Application.OpenForms on 14th Dec to
see some material about resizing MDI children etc.
Stephanie showd me how to do it and leaving a MDI child maximised does
not utilize the facilities available for an MDI application.
The user cannot resize the forms to show them side by side if they are
maximised - if he wants to.
He may not even realise that there are other MDI children displayed
'under' the one he is looking at.
My problem was to generate the MDI child so that it filled the available
space without being docked or maximised.

Garry
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:8E**********************************@micros oft.com...
You are the MAN!! Thank you Miro. I have struggled with this on other
MDI apps and went about it a much LONGER way. Thanks again.

Tony

"Miro" <mi******@golden.netwrote in message
news:uB**************@TK2MSFTNGP03.phx.gbl...
This happend to me....
Are you using the Property to maximize? or doing it by code?
>
If you notice, it is actually showing you the form the exact size it
is in development mode.
>
Try to show the form maximized thru code
>
fMain = New frmMain
fMain.WindowState = FormWindowState.Maximized
fMain.Show()
and leave the windowstate "Normal" on the property of the form.
>
Compile...
it should work,
>
Now if you get rid of the code, and change your property back to show
"maximized" it should work.
>
After I ran into this...i always show all my forms maximized thru code
( like above ) and leave all my forms "Normal", and it has never
happend since.
>
>
Lemmi know if this fixed you as well. Im sure others will run into
this too.
>
Miro
>
>
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:54**********************************@micr osoft.com...
>How do you maximize a child form when you show the child form. My
>resolution on my screen is 1440 x 900. My parent form maximizes just
>fine, but when I show a child form it doesn't maximize. It doesn't
>separate itself from the child form, meaning you can't move it around
>like if the form was "restored" but it doesn't take up all the space
>available.
>>
>I do not have the maximum or minimum size set in the properties, but
>I do have the WindowState set to Maximized. I also have the size
>property set to 800 x 600 and that is the size that the form starts
>up as.
>>
>Any answers would be greatly appreciated.
>>
>Thanks, Tony
>
>



Dec 20 '06 #8
I read your posts back and forth from Garry and you and I fully understand
where Garry is coming from. But, my problem is what you helped me fix. The
user can still "RESTORE" the child window and see other child windows behind
them, they can resize them, but the kind of app I'm making they will not
have a use for seeing multiple windows. If they want to see which child
windows they have open, they will have to click on the "Window" menu item
and see the open windows.

Thank you again for helping me with that problem. It worked GREAT!!!

Tony K.

"Miro" <mi******@golden.netwrote in message
news:uT**************@TK2MSFTNGP02.phx.gbl...
>A soon as I seen your question, I realized you had the same nightmare I ran
into.

I am slowely teaching myself VB.net and I - for the life of me, couldnt
figure out what I had done wrong. Seems it wasnt me at all !!! :-)

I am not sure if the same thing happens on non "MDI" apps, but I dont risk
it anymore. I keep all my apps as "Normal", and
set it during code at runtime.

Glad to be of help.
Cheers

Miro
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:8E**********************************@microsof t.com...
>You are the MAN!! Thank you Miro. I have struggled with this on other
MDI apps and went about it a much LONGER way. Thanks again.

Tony

"Miro" <mi******@golden.netwrote in message
news:uB**************@TK2MSFTNGP03.phx.gbl...
>>This happend to me....
Are you using the Property to maximize? or doing it by code?

If you notice, it is actually showing you the form the exact size it is
in development mode.

Try to show the form maximized thru code

fMain = New frmMain
fMain.WindowState = FormWindowState.Maximized
fMain.Show()
and leave the windowstate "Normal" on the property of the form.

Compile...
it should work,

Now if you get rid of the code, and change your property back to show
"maximized" it should work.

After I ran into this...i always show all my forms maximized thru code
( like above ) and leave all my forms "Normal", and it has never happend
since.
Lemmi know if this fixed you as well. Im sure others will run into this
too.

Miro
"Tony K" <ki********@NOSPAMcomcast.netwrote in message
news:54**********************************@micros oft.com...
How do you maximize a child form when you show the child form. My
resolution on my screen is 1440 x 900. My parent form maximizes just
fine, but when I show a child form it doesn't maximize. It doesn't
separate itself from the child form, meaning you can't move it around
like if the form was "restored" but it doesn't take up all the space
available.

I do not have the maximum or minimum size set in the properties, but I
do have the WindowState set to Maximized. I also have the size
property set to 800 x 600 and that is the size that the form starts up
as.

Any answers would be greatly appreciated.

Thanks, Tony


Dec 21 '06 #9

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

Similar topics

19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
3
by: Joshua Russell | last post by:
Hi, Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
13
by: MD | last post by:
I have been converting a program from VB6 to VB.Net and enhancing it as well. All has been progressing OK although its been hard work. Now, all of a sudden, when I try to execute a ShowDialog()...
15
by: Joshua Kendall | last post by:
I have a script in which it keeps opening the same form instead of only one instance. I also need help with a form that has a password. Where do I put the actual password? can I use a database for...
3
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. ...
8
by: Stephen Rice | last post by:
Hi, I have a periodic problem which I am having a real time trying to sort. Background: An MDI VB app with a DB on SQL 2000. I have wrapped all the DB access into an object which spawns a...
3
by: Geraldine Hobley | last post by:
Hello, In my project I am inheriting several forms. However when I inherit from a form and add additional subroutines and methods to my inherited form I get all sorts of problems. e.g. I sometimes...
6
by: dbuchanan | last post by:
I have a Windows Forms application that accesses SQL Server 2k from a small local network. The application has been used for weeks on other systmes but a new install on a new machine retruns...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
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: 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
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
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
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...

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.