I have 2 listview controls called Source and Destination.
I am using the form keydown event to capture the delete key.
When you press the delete key - how can I tell which listview has focus so I can delete the correct object from the selected listview?
Code:
If Not IsNull(SourceView.SelectedItem) Then MsgBox SourceView.SelectedItem
If Not IsNull(DestinationView.SelectedItem) Then MsgBox DestinationView.SelectedItem
SourceView.SelectedItem = Nothing
DestinationView.SelectedItem = Nothing
Exit Sub
I am using the form keydown event to capture the delete key.
When you press the delete key - how can I tell which listview has focus so I can delete the correct object from the selected listview?
Code:
If Not IsNull(SourceView.SelectedItem) Then MsgBox SourceView.SelectedItem
If Not IsNull(DestinationView.SelectedItem) Then MsgBox DestinationView.SelectedItem
SourceView.SelectedItem = Nothing
DestinationView.SelectedItem = Nothing
Exit Sub