Hello,
I'm building a simple form, with a textbox and no buttons. I have it so that when a user presses the Enter Key it will simply add the text to a list (as well as writing it to a file) and then blank the line waiting for another line of text. Everything is working great, except I cannot seem to get it to stop doing that "BEEP" everytime I press Enter. Here is the code I am using to allow the Enter Key to do it's thing. Any help would be greatly appreciated.
-+{John Vogel}+-
I'm building a simple form, with a textbox and no buttons. I have it so that when a user presses the Enter Key it will simply add the text to a list (as well as writing it to a file) and then blank the line waiting for another line of text. Everything is working great, except I cannot seem to get it to stop doing that "BEEP" everytime I press Enter. Here is the code I am using to allow the Enter Key to do it's thing. Any help would be greatly appreciated.
Code:
Private Sub TextBox2_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox2.KeyDown
If e.KeyCode = Keys.Enter Then
FileOpen(1, ThisFile, OpenMode.Append)
ThisLine = TextBox2.Text
PrintLine(1, ThisLine)
ListBox1.Items.Add(ThisLine)
I = I + 1
TextBox2.Text = ""
FileClose(1)
End If
-+{John Vogel}+-