Author | Message | Time |
---|---|---|
blinkdude | ok when i hit enter on my text box everything works fine but windows Dings or beeps what every it is! got nay idea's hot to stop it :) [code] Private Sub TextSend_KeyDown(KeyAscii As Integer, Shift As Integer) If (KeyAscii = 13) Then Text1.Text = Text1.Text & "<" & CleanSlateBot1.Username & "> " & TextSend.Text & vbCrLf CleanSlateBot1.Send TextSend.Text TextSend.Text = "" Else End If End Sub [/code] | July 11, 2003, 5:43 AM |
Soul Taker | Set KeyAscii to 0 after you're done sending or whatever. [code] Private Sub TextSend_KeyDown(KeyAscii As Integer, Shift As Integer) If (KeyAscii = 13) Then Text1.Text = Text1.Text & "<" & CleanSlateBot1.Username & "> " & TextSend.Text & vbCrLf CleanSlateBot1.Send TextSend.Text TextSend.Text = "" KeyAscii = 0 End If End Sub [/code] | July 11, 2003, 5:58 AM |
blinkdude | thx for trying to help but it still dings :/ | July 11, 2003, 6:58 AM |
Stealth | As long as the variable KeyAscii is 0 when the subroutine finishes, it won't ding. :\ | July 11, 2003, 7:00 AM |
blinkdude | [code] Private Sub TextSend_KeyDown(KeyAscii As Integer, Shift As Integer) If (KeyAscii = 13) Then Text1.Text = Text1.Text & "<" & CleanSlateBot1.Username & "> " & TextSend.Text & vbCrLf CleanSlateBot1.Send TextSend.Text TextSend.Text = "" KeyAscii = 0 Else End If End Sub [/code] if this code is right it still dings for me =[ | July 11, 2003, 7:09 AM |
SNiFFeR | Why dont you try [code] Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Text1.Text = Text1.Text & "<" & CleanSlateBot1.Username & "> " & TextSend.Text & vbCrLf CleanSlateBot1.Send TextSend.Text TextSend.Text = "" KeyAscii = 0 End If End Sub [/code] | July 11, 2003, 7:11 AM |
blinkdude | ah yes this works but you have to add [code] Private Sub Text1_KeyPress(KeyAscii As Integer) If (KeyAscii = 13) Then Text1.Text = Text1.Text & "<" & CleanSlateBot1.Username & "> " & TextSend.Text & vbCrLf CleanSlateBot1.Send TextSend.Text TextSend.Text = "" KeyAscii = 0 End If End Sub [/code] i needed the "("")" around keyascii = 13 | July 11, 2003, 8:40 AM |
iago | You shouldn't in visual basic.. you only need brackets in an "if"in c++. | July 11, 2003, 12:12 PM |
Camel | [quote author=iago link=board=17;threadid=1872;start=0#msg14516 date=1057925553] You shouldn't in visual basic.. you only need brackets in an "if"in c++. [/quote] some (old) c++ compilers dont even require parentheses around it if it's a single bool [edit] err, all if statements take a single bool, but i mean just a single variable cast as bool | July 11, 2003, 9:47 PM |