Hi Phil,
Based on my understanding, you have an MDI parent and a control, e.g. a
ListView, which is docked on the MDI parent. You'd like to get the size of
the MdiClient that is not covered by the ListView. If I'm off base, please
feel free to let me know.
In fact, the MdiClient is a control that is contained in an MDI parent. We
can get it by looping the child control collection of the MDI parent. Once
we get the MdiClient control, we know its size. The following is a sample.
Dim mc As MdiClient = Nothing
For Each ctrl As Control In Me.Controls
If (ctrl.GetType().Equals(GetType(MdiClient))) Then
mc = CType(ctrl, MdiClient)
exit For
End If
Next
When we add a control in an MDI parent and dock it to a side, the MdiClient
control won't be covered by the added control, instead, it will take the
rest space of the MDI parent. So we needn't calculate the size of the
MdiClient that is not covered by other control at all.
If you have any question, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.