How to tell if a MDIChild form is Active

Posted on 2014-10-22
Last Modified: 2014-10-22
My windows application has a MDIForm as the main form with multiple MIDChild forms. How can tell which MDIChild form is the ActiveForm? I couldn't seem to find how to determine this in the MSDN documentation.
Question by:BlakeMcKenna
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 15

Expert Comment

by:David L. Hansen
ID: 40397093
The Form.MdiChildActivate event is always triggered when the MDI child form get activeated; just handle the event and you've there.
LVL 63

Accepted Solution

Fernando Soto earned 500 total points
ID: 40397121
You can use the ActiveMdiChild Property of the MDI main form.

Author Comment

ID: 40397147

Thanks for your response, however, I looked on MSDN for the MDIChildActivate Event and unfortunately it wasn't very helpful. Perhaps my screenshot can explain what I'm trying to do.


Author Closing Comment

ID: 40397155

That's what I was looking for!

LVL 63

Expert Comment

by:Fernando Soto
ID: 40397176
Not a problem BlakeMcKenna, glad to help.

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question