PROPERTIES:
CODEING:
label | |
Text | Enter A Temperature |
RadioButton1 | |
Text | Celsius |
RadioButton2 | |
Text | Fahrenheit |
Public Class Form1
Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.Click
MsgBox("Celsius:" & (CSng(TextBox1.Text) - 32) / 1.8)
End Sub
Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.Click
MsgBox("Fahrenheit:" & (CInt(TextBox1.Text) * 1.8) + 32)
End Sub
End Class
DESIGNING:Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.Click
MsgBox("Celsius:" & (CSng(TextBox1.Text) - 32) / 1.8)
End Sub
Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.Click
MsgBox("Fahrenheit:" & (CInt(TextBox1.Text) * 1.8) + 32)
End Sub
End Class
Comments
Post a Comment