Minggu, 14 Oktober 2012

MEMBUAT APLIKASI SUHU DENGAN VISUAL BASIC

  • Pada Button1(Kelvin)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x, z As Double
x = Val(TextBox1.Text)
z = x + 273
TextBox2.Text = z
End Sub
  • Pada Button2(Farenheit)
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim x, z As Double
x = Val(TextBox1.Text)
z = (x * 1.8) + 32
TextBox2.Text = z
End Sub
  • Pada Button3(Reamur)
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim x, z As Double
x = Val(TextBox1.Text)
z = 5 / 4 * x
TextBox2.Text = z
End Sub
  • Pada Button4(Hapus)
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
TextBox1.Text = ""
TextBox2.Text = ""
End Sub

1 komentar:

tampilanya mana mas,koh g da...

Posting Komentar

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More