PROPERTIES:
CODEING:
Label1 | |
Text | (Empty) |
Label2 | |
Text | Integer |
Label3 | |
Text | Double |
Button1 | |
Text | CLEAR |
Public Class Form1
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
If Not IsNumeric(TextBox1.Text) Then
TextBox1.Text = ""
Else
Label1.Text = CDbl(Val(TextBox1.Text))
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TextBox1.Text = ""
Label1.Text = "0"
End Sub
End Class
DESIGNING:Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
If Not IsNumeric(TextBox1.Text) Then
TextBox1.Text = ""
Else
Label1.Text = CDbl(Val(TextBox1.Text))
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TextBox1.Text = ""
Label1.Text = "0"
End Sub
End Class
Comments
Post a Comment