Skip to main content

Convert the Celsius to Fahrenheit and Fahrenheit to Celsius in VB.NET.

PROPERTIES:
label
TextEnter A Temperature
RadioButton1
TextCelsius
RadioButton2
TextFahrenheit
CODEING:
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:


Comments