Nella guida NSDN ho trovato quest'esempio:
Public Sub mniCopy_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles mniCopy.Click
' Determine the active child form.
Dim activeChild As Form = Me.ActiveMDIChild
' If there is an active child form, find the active control, which
' in this example should be a RichTextBox.
If (Not activeChild Is Nothing) Then
Try
Dim theBox As RichTextBox = _
Ctype(activeChild.ActiveControl, RichTextBox)
If (Not theBox Is Nothing) Then
' Put selected text on Clipboard.
Clipboard.SetDataObject(theBox.SelectedText)
End If
Catch
MessageBox.Show("You need to select a RichTextBox.")
End Try
End If
End Sub
ma così ho un elenco delle form aperte mentre io vorrei sapere quella in primo piano...