I see your point.

I guess my first question would be this: do you need to use the MDI support?
You can have child windows inside a frame window without turning on MDI
support.

As far as I can tell, turning on MDI support for a Form does four things.
(1) turns the client area background dark grey.  (2) puts an extraneous
bevelled border around the main frame's client area.  (3) enables automatic
menu merging.  (4) provides special management for the Closing/Closed events
of the child and parent windows.

It seems that (1) and (2) are things you positively don't want.  As for (3)
and (4) you don't seem to have any menus at all, and you don't have a close
button on the child windows.  (Actually I'm not completely sure that the
special close handling isn't actually a feature of the parent/child
relationship rather than MDI.)

So why exactly are you putting the forms into MDI mode, since it only
appears to do things you don't actually want?  Why not just make the child
windows...normal child windows?


--
Ian Griffiths
DevelopMentor

----- Original Message -----
From: "Matt Horne" <[EMAIL PROTECTED]>

> I need to exactly place windows within the client area.  The application
> that I am porting does a lot of hand-holding for the user and places
> windows for them.  I also would like to get rid of that annoying border
> that is placed around the MDI client area.
>
> Here is a screen shot of the app so you can get a better idea what I
> mean...
>
> (vb6 client)
> http://julianna.baseline.com/screen1.gif
>
> (beginning of dotnet client, notice the border around the mdi client area)
> http://julianna.baseline.com/dotnet1.gif
>
>
>
> Ian Griffiths <[EMAIL PROTECTED]> wrote:
>
> I'm guessing there is no property on the form to give you this because as
> the documentation says, the MdiClient class "supports the .NET
> infrastructure and is not intended to be used directly from your code."
>
> So it's not intended for public consumption.  There's not even any
> guarantee
> that it will be there in future versions of the framework.  So writing
code
> with a dependency on it is probably not a good idea.  What exactly are you
> trying to achieve?  (Why do you need to know the exact client area size?)
>
> ----- Original Message -----
> From: "Matt Horne" <[EMAIL PROTECTED]>
>
> > Anyone know why the MDIClient object (the client window inside of an
> > MDIForm that is the parent of all the MDI child windows) is not
available
> > (maybe as a property of the MDI form)?
> >
> > I noticed that the MDIForm.ClientRectangle is not the same as the
> > MDIClient.ClientRectangle because of that annoying border that is put on
> > the MDIClient window.  You can get to the MDIClient object by using code
> > like this....
> >
> >         Dim f As New Form()
> >         f.MdiParent = Me
> >         _MDIClient = f.Parent
> >         f.Dispose()
> >         f = Nothing
> >
> > ...I can get to the MDIClient object and get the proper size of the
> client
> > area.  It also allows me to paint the client area if I want to.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to