Board index » delphi » Cosmetic problems with MDI

Cosmetic problems with MDI

Hi,

I'm designing an MDI app where I want one of the child forms to always
be maximised. The problem is that although the child doesn't have any
min/max buttons, when another child form is opened this form is set to
normal size (ie: not maximised).

I've tried putting code in the OnResize event to set the window
maximised again when this event occurs, and although this works, I can
still see the child going non-maximised and then maximising -
which looks pretty {*word*99}.

Also I have set the default state of other child forms to be maximised
when created, and again this works but I still see the window in its
initial state first and then immediately maximising, again not very
professional looking.

Anyone else have this problem? How do I overcome it?

I wondered if there was a message I could trap to stop this happening?
I've tried several with no luck so far...

Cheers,
Rob

--
Robert Harvey
Robert.Har...@dial.pipex.com
http://dspace.dial.pipex.com/town/square/aai99

 

Re:Cosmetic problems with MDI


Quote
Robert Harvey wrote:

> Hi,

> I'm designing an MDI app where I want one of the child forms to always
> be maximised. The problem is that although the child doesn't have any
> min/max buttons, when another child form is opened this form is set to
> normal size (ie: not maximised).
<snip>
> Anyone else have this problem? How do I overcome it?

I've a similar problem. Sorry, not fix but am interested in solutions.

Good Luck,
Jim
--
CAPMan HF Propagation Prediction & System Analysis Software
http://ourworld.compuserve.com/homepages/KU5S

Re:Cosmetic problems with MDI


In article <32384A84.6...@wtrt.net>, James Lee Tabor <k...@wtrt.net> wrote:

Quote
>Robert Harvey wrote:

>> Hi,

>> I'm designing an MDI app where I want one of the child forms to always
>> be maximised. The problem is that although the child doesn't have any
>> min/max buttons, when another child form is opened this form is set to
>> normal size (ie: not maximised).
><snip>
>> Anyone else have this problem? How do I overcome it?

  I don't think that you can have a MDI window maximized under a non maximized
MDI child.  What you could do is instead of maximizing the underneath window,
try setting it's coordinates to being the full MDI cleint area, this will give
you the look I think you are trying for.  Also take a look at the windows
message EV_WM_MDIACTIVATE, this message is sent when a MDI window loses or
gains focus, you get the handle to both the window gaining focus and losing
focus.  The window you want to be full screen underneath can look for when it
loses focus and resize itself accordingly.  Hope this is of help.

Re:Cosmetic problems with MDI


Quote
Robert.Har...@dial.pipex.com (Robert Harvey) wrote:
>Hi,
>I'm designing an MDI app where I want one of the child forms to always
>be maximised. The problem is that although the child doesn't have any
>min/max buttons, when another child form is opened this form is set to
>normal size (ie: not maximised).

I managed to get this working with help from Nick. I had to use

LockWindowUpdate(MainForm.Handle);

while maximizing my child form and then use:

LockWindowUpdate(0);

This stops the windows appearing normal and then maximizing, they just
appear maximized.

Thanks,
Rob
--
Robert Harvey
Robert.Har...@dial.pipex.com
http://dspace.dial.pipex.com/town/square/aai99

Other Threads