Hi Everyone,
This is probably simple but I don't know how. Can someone show me a code the test if the child form is currently active or currently the one open in front of my screen.
Thanks in advance.

newvbguy

Recommended Answers

All 2 Replies

Sure.

Create a new project, add an MDI form and 2 or more MDI Child forms.

in the MDI Form code window paste:

Private Sub MDIForm_Click()
MsgBox Me.ActiveForm.Caption
End Sub

Click on the MDI form to see which child form is currently active. The .ActiveForm property gives you complete access to the current active MDI Child. For example: .hide .show .caption .width .height etc...

thanks a lot...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.