Membuat tabel konversi suhu dengan VB.6

langsung aj kita praktekin ya, bikin korvrsi suhu tapi kita harus ingat dulu rumus – rumus konversi suhu, rumusnya seperti image di bawah ini.

setelah itu mari kita bikin tabel sesuai selera kita
contohnya simple aja deh

selanjutnya copy paste aja deh codingnya.
codingnya sebagai berikut:

Private Sub Command1_Click()
txtReamur1.Text = 4 / 5 * txtCelcius1.Text
txtFah1.Text = 32 + (9 / 5 * txtCelcius1.Text)
txtKelvin1.Text = txtCelcius1.Text + 273
End Sub

_______________________________

Private Sub Command2_Click()
txtCelcius2.Text = txtKelvin2.Text – 273
txtFah2.Text = 32 + (9 / 5 * (txtKelvin2 – 273))
txtReamur2.Text = (txtKelvin2 – 273) * 4 / 5
End Sub
_______________________________

Private Sub Command3_Click()
txtCelcius3.Text = 5 / 9 * (txtFah3.Text – 32)
txtKelvin3.Text = (5 / 9 * (txtFah3.Text – 32)) + 273
txtReamur3.Text = (txtFah3.Text – 32) * 4 / 9
End Sub
________________________________

Private Sub Command4_Click()
txtCelcius4.Text = txtReamur4.Text * 5 / 4
txtKelvin4.Text = (5 / 4 * txtReamur4.Text) + 273
txtFah4.Text = (9 / 4 * txtReamur4.Text) + 32
End Sub
________________________________

Private Sub Command5_Click()
End
End Sub
________________________________

Private Sub Command6_Click()
txtCelcius1.Text = Clear
txtKelvin1.Text = Clear
txtFah1.Text = Clear
txtReamur1.Text = Clear
txtKelvin2.Text = Clear
txtCelcius2.Text = Clear
txtFah2.Text = Clear
txtReamur2.Text = Clear
txtFah3.Text = Clear
txtCelcius3.Text = Clear
txtKelvin3.Text = Clear
txtReamur3.Text = Clear
txtReamur4.Text = Clear
txtCelcius4.Text = Clear
txtKelvin4.Text = Clear
txtFah4.Text = Clear
End Sub

jadi deh, hasilnya kurang lebih seperti ini, anda dapat mengembangkannya sendiri.

selamat mencoba ya

~ oleh wahyututorial pada 12 April 2010.

Satu Tanggapan to “Membuat tabel konversi suhu dengan VB.6”

  1. Yang kelvin dan Fahrenheit error…..

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

 
%d blogger menyukai ini: