• Welcome to Valhalla Legends Archive.
 

alt + <anykeyhere> beep error

Started by Puzzle, March 08, 2004, 01:21 PM

Previous topic - Next topic

Puzzle

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.

Stealth

Set the KeyAscii value to 0 when you're finished with it.
- Stealth
Author of StealthBot

Puzzle

that doesn't work when alt is the shift key

Stealth

- Stealth
Author of StealthBot

Puzzle

#4

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

Stealth

#5
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
- Stealth
Author of StealthBot

Newby

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. ^^
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

Puzzle