Ok, I've been working on this almost all day and can't seem to find any documentation on how to stop the keypress handlers from causing the beep after the keystroke has been processed.
From what I've researched the only way to stop this is to have the character as a menu shortcut which would defeat the purpose of what I'm trying to do.
The purpose of this is going to be adding the slected username in the listview to the textbox.
Set the KeyAscii value to 0 when you're finished with it.
that doesn't work when alt is the shift key
Quote from: Puzzle on March 08, 2004, 02:12 PM
that doesn't work when alt is the shift key
Post some code?
Private Sub lwRoomUsers_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = 4 Then
If KeyCode = 78 Then
With frmMain.txtSend
.text = .text & frmMain.lwRoomUsers.SelectedItem.text
.SetFocus
.SelStart = Len(.text)
End With
End If
End If
KeyCode = 0
End Sub
Edit: pasted wrong code
Try this;
Private Sub lwRoomUsers_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = 4 Then
If KeyCode = 78 Then
With frmMain.txtSend
.text = .text & frmMain.lwRoomUsers.SelectedItem.text
.SetFocus
.SelStart = Len(.text)
End With
End If
KeyCode = 0
Shift = 0 '// setting both of them perhaps?
End If
End Sub
Quote from: Stealth on March 09, 2004, 05:44 PM
Try this;
Shift = 0 '// setting both of them perhaps?
Somebody wants to feel like they're coding in a langauge other then Visual Basic. ^^
I tried that also :-\