No, but your code could be better. I don't understand why you're trying to hide an MDI Child form that is losing the focus. That doesn't make any sense to me. Under normal MDI operations, the parent MDIChildActivate will fire when the focus changes from one MDI Child to another, or when the last child is closed.
You don't have to have an array of names to check which form is the active one, instead you can use the Is operator to check object equality:
If you really must hide a child that goes out of focus, you could perhaps try the BeginLayout and EndLayout methods of the parent form, to indicate you're performing a multi-step operation and it shouldn't redraw or raise certain events.
You don't have to have an array of names to check which form is the active one, instead you can use the Is operator to check object equality:
Visual Basic:
If Me.ActiveMDIChild Is frmObjectArray(1) Then
If you really must hide a child that goes out of focus, you could perhaps try the BeginLayout and EndLayout methods of the parent form, to indicate you're performing a multi-step operation and it shouldn't redraw or raise certain events.