ListView Problems

GregSmith

Registered User.
Local time
Today, 13:22
Joined
Feb 22, 2002
Messages
126
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
 
Can you not test if one has the focus?

Code:
If ListView1.SetFocus = True Then

OR, Does the ListView objects not have a Key Down event?
 
It does not understand setfocus.
 

Users who are viewing this thread

Back
Top Bottom