|
-
January 5th, 2000, 05:56 PM
#1
keyascii
when i enter the code in List1.Keypress
if keyascii = 68 then list1.removeitem (list1.listindex);
if the user hits D then the selected item is removed.
when I do it with delete, however:
if keyascii = 46 then list1.removeitem (list1.listindex)
when they press DELETE nothing happens! What is the code>?
-
January 5th, 2000, 10:14 PM
#2
Re: keyascii
Use the KeyDown Event instead and use the VB constants, ie.
private Sub List1_KeyDown(KeyCode as Integer, Shift as Integer)
If List1.ListIndex > -1 then
If KeyCode = vbKeyDelete then
List1.RemoveItem List1.ListIndex
End If
End If
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|