: How to keep a MDI-parent maximized? 
Author Message
 : How to keep a MDI-parent maximized?

Hi

I'm working with this project, and in using the MDI form. But I'd like to
disable the maxbutton, so the user can "normalize" the form. Now I'm just
checking the resize event, and if the windowstate prop. has changed to
normal, I change it back to maximized. It works, but really looks BAAAD!
So, any ideas? Please.

Thanks.
- Asbj?rn



Sat, 05 Jun 1999 03:00:00 GMT  
 : How to keep a MDI-parent maximized?

Put into Form_Load event
Me.WindowState=2 and make Form.BorderStyle=1.
That's it!!!

Quote:

> But I'd like to
> disable the maxbutton, so the user can "normalize" the form. ....
> So, any ideas? Please.



Sun, 06 Jun 1999 03:00:00 GMT  
 : How to keep a MDI-parent maximized?

I'd like to help you, but your question is very cryptic.  You will have to
be more concise.



Mon, 07 Jun 1999 03:00:00 GMT  
 : How to keep a MDI-parent maximized?

MDI Form does not have a BorderStyle Property or Method.

Miten Patel

Quote:

>Put into Form_Load event
>Me.WindowState=2 and make Form.BorderStyle=1.
>That's it!!!

>> But I'd like to
>> disable the maxbutton, so the user can "normalize" the form. ....
>> So, any ideas? Please.



Tue, 08 Jun 1999 03:00:00 GMT  
 : How to keep a MDI-parent maximized?

Quote:

> I'd like to help you, but your question is very cryptic.  You will have to
> be more concise.

Ok. I have a MDI form. My program has some pictureboxes with all sorts of
controls in them. If the user should be allowed to make the form normal
(ie not maximized or minimized) it would look rather silly (at least in
640x480). And since the MDI form doesn't have the maxbutton property (to
turn it off), I wondered what I should do to prevent the user from making
the MDI form normal. Of course, the MDI starts up in a maximized style.
Any clearer?

- Asbj?rn



Wed, 09 Jun 1999 03:00:00 GMT  
 : How to keep a MDI-parent maximized?

There are a couple of ways you can do this.  You can set the border of
the MDI form to fixed, so the user cannot change the size of the form.
Or you could use the form Resize event to maximize the form if it is
changed.

Mark

Quote:


>> I'd like to help you, but your question is very cryptic.  You will have to
>> be more concise.

>Ok. I have a MDI form. My program has some pictureboxes with all sorts of
>controls in them. If the user should be allowed to make the form normal
>(ie not maximized or minimized) it would look rather silly (at least in
>640x480). And since the MDI form doesn't have the maxbutton property (to
>turn it off), I wondered what I should do to prevent the user from making
>the MDI form normal. Of course, the MDI starts up in a maximized style.
>Any clearer?

>- Asbj?rn



Thu, 10 Jun 1999 03:00:00 GMT  
 : How to keep a MDI-parent maximized?

Quote:


>> I'd like to help you, but your question is very cryptic.  You will have to
>> be more concise.

>Ok. I have a MDI form. My program has some pictureboxes with all sorts of
>controls in them. If the user should be allowed to make the form normal
>(ie not maximized or minimized) it would look rather silly (at least in
>640x480). And since the MDI form doesn't have the maxbutton property (to
>turn it off), I wondered what I should do to prevent the user from making
>the MDI form normal. Of course, the MDI starts up in a maximized style.
>Any clearer?

>- Asbj?rn

Check the resize event of the MDI form. Put code there that basically
keeps it at the dimensions you want. Anytime a form is resized it
activates this event.

                                                Ty



Thu, 10 Jun 1999 03:00:00 GMT  
 : How to keep a MDI-parent maximized?

Quote:

> There are a couple of ways you can do this.  You can set the border of
> the MDI form to fixed, so the user cannot change the size of the form.
> Or you could use the form Resize event to maximize the form if it is
> changed.

> Mark


Doesn't look pretty though. I'll try some more.

- Asbj?rn



Fri, 11 Jun 1999 03:00:00 GMT  
 : How to keep a MDI-parent maximized?

: >
: > There are a couple of ways you can do this.  You can set the border of
: > the MDI form to fixed, so the user cannot change the size of the form.
: > Or you could use the form Resize event to maximize the form if it is
: > changed.

: Doesn't look pretty though. I'll try some more.

I had a similar problem a while back.  What worked was to use MsgHook.VBX
to trap the WM_WINDOWPOSCHANGING message and then set a flag that says to
ignore the changes.

Get a copy of MsgHook or MsgBlaster or another "subclassing" control and
then E-mail me and I'll send you the details.  I'm not in Windows now, so
I can't copy it here, but it's only a few lines of code that I was sent
by a guy in England who got it off CompuServe, I think.



Fri, 11 Jun 1999 03:00:00 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. Maximized MDI child form Covering Status bar on MDI parent

2. Disallow Maximize On MDI Parent

3. How to keep an MDI Child Window Maximized

4. Keeping controls in the backgroind on MDI Parent

5. Keeping a form on top of an MDI-parent

6. Move activex dll child on a MDI parent parent window

7. Modifying object in MDI Parent form from MDI Child form

8. How do I know if there are any MDI childs in a MDI parent

9. Calling MDI child code from MDI parent menu???

10. MDI Child to an MDI Parent

11. MDI Child to an MDI Parent

12. MDI Child to an MDI Parent

 

 
Powered by phpBB® Forum Software