I recently moved a listview control inside a SplitContainer. The problem is the ActiveControl is the SplitControl not the listview inside it. Bug?? It worked fine as is until I put the ListView in the SplitterControl.
I have a contextmenu_click event containing the following code.
Private Sub cmnuSelectAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmnuSelectAll.Click
If ActiveControl.Name = lvwLeftList.Name Then
Dim ListLeft As ListViewItem
For Each ListLeft In lvwLeftList.Items
If ListLeft.ImageIndex <> 5 Then
ListLeft.Selected = True
If ActiveControl.Name = lvwRightList.Name Then
Dim ListRight As ListViewItem
For Each ListRight In lvwRightList.Items
If ListRight.ImageIndex <> 5 Then
ListRight.Selected = True