Disallowing maximize button on MDI child form 
Author Message
 Disallowing maximize button on MDI child form

Have you ever tried setting the WindowsState property on an MDI child form
to 2 (Maximized) with the MaxButton property set to false?  If you have you
will know it does not work!!  According to a Microsoft's VB Escalation Team
member this is "by design for an MDIChild From" although VB5's definition
of MaxButton is to indicate whether a form has/does not have a MaxButton...
not consistent if you ask me.

Enough background... has anyone found a workaround for this?  I need a
Child Form that is always maximized (Windows State = 2) and cannot be
altered by the user outside of closing the form.  I've tried using the
GetWindowLong and SetWindowLong Windows API calls to disable the
WS_MAXMIMIZE bit in the GWL_STYLE parameter which works fine for a Parent
form, but does not work for a child form.

Microsoft's solution was to set the Width & Height to "some Large values...
so that it looks Maximized".  That's not acceptable either since the form
is still in a Normal state with a horizontal scroll bar at the bottom (yuk)
that the user must use to find the close button, stuck somewhere out in
never never land.


Thank you very much.



Mon, 16 Oct 2000 03:00:00 GMT  
 Disallowing maximize button on MDI child form

This one is quite simple... I'm surprised MS Tech Support didn't know.
Turn the ControlBox setting for the child form to false and set the
WindowState property to 2 - Maxamize (which you said you do... I also
set the child caption to nothing). I've done this several times and
works just fine.


Quote:
>Have you ever tried setting the WindowsState property on an MDI child form
>to 2 (Maximized) with the MaxButton property set to false?  If you have you
>will know it does not work!!  According to a Microsoft's VB Escalation Team
>member this is "by design for an MDIChild From" although VB5's definition
>of MaxButton is to indicate whether a form has/does not have a MaxButton...
>not consistent if you ask me.

>Enough background... has anyone found a workaround for this?  I need a
>Child Form that is always maximized (Windows State = 2) and cannot be
>altered by the user outside of closing the form.  I've tried using the
>GetWindowLong and SetWindowLong Windows API calls to disable the
>WS_MAXMIMIZE bit in the GWL_STYLE parameter which works fine for a Parent
>form, but does not work for a child form.

>Microsoft's solution was to set the Width & Height to "some Large values...
>so that it looks Maximized".  That's not acceptable either since the form
>is still in a Normal state with a horizontal scroll bar at the bottom (yuk)
>that the user must use to find the close button, stuck somewhere out in
>never never land.


>Thank you very much.

Chris Nielsen - EDS



Sun, 26 Nov 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

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

2. Q: Form activate Fires On Non Child MDI Forms But Only Once On Child Mdi Forms

3. Disallow Maximize On MDI Parent

4. Maximized MDI Child Form problem

5. Gap Between MDI and Child form when maximized ??

6. HELP: BUG: Maximized Win95 MDI Child Form Disappears

7. Hiding maximized MDI Child forms

8. MDI Child Forms Maximizing uncontrolably?

9. Problem with MDI Child Form when opened maximized ?

10. Displaying maximized MDI child forms in VB5

11. Disabling Maximize Button on an MDI FORM????

12. Hiding the maximize/restore button on MDI form

 

 
Powered by phpBB® Forum Software