Hi all
I thought I would convert an old program to use just .net, removing the
Microsoft.Visual Basic namespace.
I seem to have succeeded except for just one are. What is the .net
equivalent to chr(). I am capturing the keyboard input and if it's a
carriage return I call the Caluculate Subroutine.
Private Sub txtVat_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtVat.KeyPress
If Not (Char.IsDigit(e.KeyChar) Or Char.IsControl(e.KeyChar) Or
e.KeyChar = dp) Then
e.Handled = True
End If
If e.KeyChar = Chr(13) Then
Call Calculate()
End If
End Sub
I have tried replacing the chr(13) with
If e.KeyChar = Environment.NewLine Then
Call Calculate()
End If
No joy. I'm sure there must be a way to do this in .net.
Help please. Thanks in advance
--
DaveG