Answered by:
Detect if a MDIchild is the last MDIchild

Question
-
I want to detect if a form is the last/only MDIchild of a MDI Parent.
mehThursday, April 28, 2011 2:49 PM
Answers
-
If MdiParentForm.MdiChildren.Count = 1
Thanks
Social lounge for MSDN forum users :-)
Living on Earth may be expensive, but did you know that it includes a free trip around the sun? Isn't that worth it?Friday, April 29, 2011 7:04 AM
All replies
-
If MdiParentForm.MdiChildren.Count = 1
Thanks
Social lounge for MSDN forum users :-)
Living on Earth may be expensive, but did you know that it includes a free trip around the sun? Isn't that worth it?Friday, April 29, 2011 7:04 AM -
Hi Meh,
Thanks for posting in the MSDN Forum.
Any update? I have marked Omie's reply as answer, if you think it provides no help, please unmark it, and feel free to let me know your any concerns.
Thank you for your understanding and support.
Mike Feng [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Friday, May 6, 2011 12:57 PM -
I'm programming in C# too now, so unless this thread hsould be moved; "Count" doesn't exist in c#, how would I do it?
mehThursday, May 19, 2011 7:58 PM -
Hi Meh,
please try this:
if (this.MdiChildren.Count() == 1) { }
I hope this will be helpful.
Best regards,
Mike Feng [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Proposed as answer by Mike Feng Friday, May 20, 2011 1:48 AM
Friday, May 20, 2011 1:48 AM