You are viewing our Forum Archives. To view or take place in current topics click here.
how to make a Temperature Converter in vb
Posted:
how to make a Temperature Converter in vbPosted:
Status: Offline
Joined: May 19, 201113Year Member
Posts: 73
Reputation Power: 2
Status: Offline
Joined: May 19, 201113Year Member
Posts: 73
Reputation Power: 2
#2. Posted:
Status: Offline
Joined: Mar 21, 201113Year Member
Posts: 1,659
Reputation Power: 111
Status: Offline
Joined: Mar 21, 201113Year Member
Posts: 1,659
Reputation Power: 111
I couldn't watch, I just to got too frustrated.
I've never seen a slower typer in my life, seriously.
I've never seen a slower typer in my life, seriously.
- 1useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Jun 12, 201014Year Member
Posts: 531
Reputation Power: 33
#4. Posted:
Status: Offline
Joined: May 19, 201113Year Member
Posts: 73
Reputation Power: 2
Status: Offline
Joined: May 19, 201113Year Member
Posts: 73
Reputation Power: 2
sorry about the slow typing i never type that slow but it was really dark when i made the video i will up load the code in a few sorry guys
- 0useful
- 0not useful
#5. Posted:
Status: Offline
Joined: May 19, 201113Year Member
Posts: 73
Reputation Power: 2
Status: Offline
Joined: May 19, 201113Year Member
Posts: 73
Reputation Power: 2
here is the code and remember to sub for more thanks
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim FCTemp, Celsius, Fahrenheit As Single
Dim strFCTemp As String
Dim Prompt As String = "Please enter a Fahrenheit or Celsius temperature below"
Do
strFCTemp = InputBox(Prompt, "Fahrenheit Selsius Converter")
If strFCTemp <> "" Then
FCTemp = CSng(strFCTemp)
Celsius = ((FCTemp - 32) / 9) * 5
Fahrenheit = ((FCTemp * 9) / 5) + 32
MsgBox(FCTemp & " Fahrenheit is " & Celsius & " Celsius." & vbCrLf & FCTemp & " Celsius is " & Fahrenheit & " Fahrenheit.", , "Converted Temperature")
End If
Loop While strFCTemp <> ""
Me.Close()
End Sub
End Class
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim FCTemp, Celsius, Fahrenheit As Single
Dim strFCTemp As String
Dim Prompt As String = "Please enter a Fahrenheit or Celsius temperature below"
Do
strFCTemp = InputBox(Prompt, "Fahrenheit Selsius Converter")
If strFCTemp <> "" Then
FCTemp = CSng(strFCTemp)
Celsius = ((FCTemp - 32) / 9) * 5
Fahrenheit = ((FCTemp * 9) / 5) + 32
MsgBox(FCTemp & " Fahrenheit is " & Celsius & " Celsius." & vbCrLf & FCTemp & " Celsius is " & Fahrenheit & " Fahrenheit.", , "Converted Temperature")
End If
Loop While strFCTemp <> ""
Me.Close()
End Sub
End Class
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.