MDI form question.

G

Guest

I have a MDI container form that l load client forms into. When I set the
FormBorderStyle to None before calling show on the client form, I can resize
the container form and if there are unseen areas of the child, it shows the
horizontal and vertical scrollbars (that's fine).

However, I want the FormBorderStyle set to Sizable so that I can treat them
like Excel workbooks and minimize, maximize, and move around however I want.
So I set FormBorderStyle to Sizable and the child's windowstate is set to
maximized. The PROBLEM is that when the container form is sized to a smaller
size so that the child form has unseen areas, there are no scrollbars and you
cannot get to those unseen areas of the child without restoring down the
child. That is similar to Excel, except in Excel when the workbook is
maximized and the container is smaller than the workbook, there are
scrollbars available so that you can get to the unseen areas of the child.

How can I duplicate how Excel handles this?
 
A

Andrew Smith \(Infragistics\)

It sounds like the scrollbars that you are referring to are the scrollbars
of the mdiclient which is displayed when any part of an mdichild is not
fully in view. When you set the WindowState of the mdichildren to Maximized,
there will never be any part of the mdichild that is not fully in view so
you will never see scrollbars. Instead, you should try setting the
AutoScroll property of your mdichild form so that you are scrolling within
the mdichild form instead of scrolling the mdiclient area.
 
G

Guest

Thanks for the response. I found out what the problem was. The child form
had it's MinimumSize property set and apparently if you size the container
form to a size smaller than the minimum size of the child, you don't get the
scrollbars. Makes sense in a way, but aggraviating none the less.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top