12-29-2009, 03:32 PM
Code:
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim frequency As Integer = 10000
Dim duration As Integer = 5000
Console.Beep(frequency, duration)
End Sub
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As _
System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
'allows only numbers
'and backspace
If (e.KeyChar < "0" OrElse e.KeyChar > "9") _
AndAlso e.KeyChar <> ControlChars.Back Then
e.Handled = True
End If
End Sub
you get the idea