PROGRAM STUDI TEKNIK INFORMATIKA FAKULTAS TEKNIK UNIVERSITAS ISLAM MAJAPAHIT MOJOKERTO 2012
KATA PENGANTAR
Puji syukur saya panjatkan kepada ALLAH SWT atas limpahan rahmatNya sehingga penulis dapat menyelesaikan makalah tentang Membuat Aplikasi Pengkonversi Suhu Sederhana.Makalah ini bisa membantu Anda mengkonversi suhu celcius ke dalam bentuk suhu yang lain seperti Fahrenheit,Reaumur dan juga Kelvin. Makalah ini disusun sebagai tugas mata pelajaran Bahasa Pemrograman Visual Basic 6 Prodi Teknik Informatika Universitas Islam Majapahit . Tentunya makalah ini pasti mempunyai kekurangan baik fisik maupun isinya. Untuk itu saran dan kritik yang membangun sangat diharapkan oleh penyusun demi kesempurnaan makalah ini. Atas perhatian para pembaca saya mengucapkan terima kasih.
Salam
Sujarwadi
Properti Program
Properti Form 1 :
KONTROL
Form1
PROPERTIES
Name Border style Caption Name Caption Backstyle Fore color Name Caption Backstyle Fore color name Caption Fore color BackStyle name Caption Fore color BackStyle Name
NILAI
Form_masukkan Fixed singgle Masukkan nama dan sandi Lbl_masukkannamasandi Masukkan Nama dan sandi anda transparant blue Lbl_nama Nama Transparent blue Lbl_sandi SANDI blue transparant Lbl_tentang tentang blue transparant Cmd_masuk
Label1
Label2
Label3
Label4
Command1
caption Command2 Text1 Text2 Timer1 Name caption Name caption Name caption Name interval
Private Sub cmd_batal_Click() intpesan = MsgBox("Apakah anda yakin tidak akan masuk aplikasi???", vbOKCancel, "Peringatan!!!!") If intpesan = vbOK Then End Else Load form_masukkan End If End Sub
Private Sub cmd_masuk_Click() If nama.Text = "sujar" And sandi.Text = "55" Then Load form_aplikasi form_aplikasi.Show Unload form_masukkan Else intpesan = MsgBox("Kombinasi nama dan sandi anda salah", vbOKOnly, "Maaf!!!!!") End If End Sub Private Sub Form_Load() cmd_masuk.Enabled = False End Sub Private Sub lbl_tentang_Click() Load form_pembuat form_pembuat.Show Unload form_masukkan cmd_masuk.Enabled = True End Sub Private Sub tmr_tentang_Timer()
TAMPILAN FORM2
Properti Form 2 :
KONTROL
Form1
PROPERTIES
Name Caption Name Caption BackStyle Fore color Name Caption BackStyle Fore color Name Caption BackStyle Fore color
NILAI
Form_pembuat Tentang pembuat Lbl_pembuat Transparent green Lbl_namasandi Transparent green Label1 kembali Transparent green
Label1
Label2
Label3
Timer1
Name interval
Tmr_pembuat 1000
Private Sub Label1_Click() Unload form_pembuat Load form_masukkan form_masukkan.Show End Sub Private Sub tmr_pembuat_Timer() lbl_pembuat.Visible = Not lbl_pembuat.Visible End Sub
TAMPILAN FORM 3
Properti Form 3 :
KONTROL
Form1
PROPERTIES
Name Caption Name Caption BackStyle Fore color Name Caption BackStyle Fore color Name
NILAI
Form_carakerja Cara kerja Label1 Cara kerja Transparent black Label2 Transparent blue Tmr_pembuat
Label1
Label2
Timer1
Private Sub cmdKe_Click() Load form_aplikasi form_aplikasi.Show Unload form_carakerja End Sub Private Sub Timer1_Timer() Label1.Visible = Not Label1.Visible End Sub
TAMPILAN FORM 4
Properti Form 1 :
KONTROL
Form1
PROPERTIES
Name Border style Form_aplikasi Fixed singgle
NILAI
Caption Label1 Name Caption Backstyle Fore color Name Caption Backstyle Fore color name Caption Fore color BackStyle name Caption Fore color BackStyle name Caption Fore color BackStyle Name caption Name caption Name caption Name caption Name caption Name caption Name interval Name interval name name
Aplikasi Konversi suhu Lbl_carakerja Cara kerja transparant red Lbl_judul Aplikasi konversi suhu Transparent red Label1 dari red transparant Label2 Ke red transparant Label3 besar red transparant Cmdhitung hitung Cmdhasil hasil Cmdkeluar keluar Cmdbersih bersihkan txtsuhu Text1 Tmr_carakerja 1000 Tmr_judul 15 cbodr cboke
Label2
Label3
Label4
Label5
Command1 Command2 Command3 Command4 Text1 Text2 Timer1 Timer2 Combo1 Combo2
Label6
Lblhasil transparant
Private Sub cmdBersih_Click() txtsuhu.Text = "" lblHasil.Caption = "" cboDR.Text = "" cboKE.Text = "" Text1.Text = "" cmdhitung.Enabled = True cmdhasil.Enabled = False End Sub Private Sub cmdhasil_Click() bs = txtsuhu.Text If cboDR = "Celcius" And cboKE = "Reaumur" Then Text1.Text = bs & " x 4 / 5 " ElseIf cd = "Celcius" And ck = "Fahrenheit" Then Text1.Text = "( " & bs & " x 9 / 5 )+ 32" ElseIf cd = "Celcius" And ck = "Kelvin" Then Text1.Text = "( " & bs & " x 5 / 5 )+ 273" ElseIf cd = "Reaumur" And ck = "Celcius" Then Text1.Text = bs & " x 5 / 4 " ElseIf cd = "Reaumur" And ck = "Fahrenheit" Then Text1.Text = "( " & bs & " x 9 / 4 )+ 32" ElseIf cd = "Reaumur" And ck = "Kelvin" Then Text1.Text = "( " & bs & " x 5 / 4 )+ 273" ElseIf cd = "Fahrenheit" And ck = "Celcius" Then Text1.Text = bs & " - 32)" & " x 5 / 9 " ElseIf cd = "Fahrenheit" And ck = "Reaumur" Then Text1.Text = "((" & bs & " - 32) x 4) / 9" ElseIf cd = "Fahrenheit" And ck = "Kelvin" Then Text1.Text = "(((" & bs & " - 32) x 5) / 9) + 273" ElseIf cd = "Kelvin" And ck = "Celcius" Then Text1.Text = "( ( " & bs & " - 273 ) x 5) / 5" ElseIf cd = "Kelvin" And ck = "Reaumur" Then Text1.Text = "( ( " & bs & " - 273) x 4) / 5" Else Text1.Text = "( ( ( " & bs & " - 273) x 9) / 5) + 32"
End If cmdhitung.Enabled = False End Sub Private Sub cmdhitung_click() bs = txtsuhu.Text cd = cboDR.Text ck = cboKE.Text If cd = "Celcius" And ck = "Reaumur" Then lblHasil.Caption = bs & " Derajat Celcius = " & (bs * 4) / 5 & " Derajat Reaumur" cmdhasil.Enabled = True ElseIf cd = "Celcius" And ck = "Fahrenheit" Then lblHasil.Caption = bs & " Derajat Celcius = " & ((bs * 9) / 5) + 32 & " Derajat Fahrenheit" cmdhasil.Enabled = True ElseIf cd = "Celcius" And ck = "Kelvin" Then lblHasil.Caption = bs & " Derajat Celcius = " & ((bs * 5) / 5) + 273 & " Derajat Kelvin" cmdhasil.Enabled = True ElseIf cd = "Reaumur" And ck = "Celcius" Then lblHasil.Caption = bs & " Derajat Reaumur = " & (bs * 5) / 4 & " Derajat Celcius" cmdhasil.Enabled = True ElseIf cd = "Reaumur" And ck = "Fahrenheit" Then lblHasil.Caption = bs & " Derajat Reaumur = " & ((bs * 9) / 4) + 32 & " Derajat Fahrenheit" cmdhasil.Enabled = True ElseIf cd = "Reaumur" And ck = "Kelvin" Then lblHasil.Caption = bs & " Derajat Reaumur = " & ((bs * 5) / 4) + 273 & " Derajat Kelvin" cmdhasil.Enabled = True
ElseIf cd = "Fahrenheit" And ck = "Celcius" Then lblHasil.Caption = bs & " Derajat Fahrenheit = " & ((bs - 32) * 5) / 9 & " Derajat Celcius" cmdhasil.Enabled = True ElseIf cd = "Fahrenheit" And ck = "Reaumur" Then lblHasil.Caption = bs & " Derajat Fahrenheit = " & ((bs - 32) * 4) / 9 & " Derajat Reaumur" cmdhasil.Enabled = True ElseIf cd = "Fahrenheit" And ck = "Kelvin" Then lblHasil.Caption = bs & " Derajat Fahrenheit = " & (((bs - 32) * 5) / 9) + 273 & " Derajat Kelvin" cmdhasil.Enabled = True ElseIf cd = "Kelvin" And ck = "Celcius" Then lblHasil.Caption = bs & " Derajat Kelvin = " & ((bs - 273) * 5) / 5 & " Derajat Celcius" cmdhasil.Enabled = True ElseIf cd = "Kelvin" And ck = "Reaumur" Then lblHasil.Caption = bs & " Derajat Kelvin = " & ((bs - 273) * 4) / 5 & " Derajat Reaumur" cmdhasil.Enabled = True ElseIf cd = "Kelvin" And ck = "Fahrenheit" Then
lblHasil.Caption = bs & " Derajat Kelvin = " & (((bs - 273) * 9) / 5) + 32 & " Derajat Fahrenheit" cmdhasil.Enabled = True ElseIf (cd = "") And (ck = "") Then lblHasil.Caption = "Harap Masukkan Kolom Isian yang Tersedia" Else lblHasil.Caption = "Harap Konversikan ke dalam Satuan Thermometer yang Berbeda" End If cmdhitung.Enabled = False End Sub Private Sub cmdKeluar_Click() intpesan = MsgBox("Apakah anda yakin akan keluar aplikasi???", vbOKCancel, "Peringatan!!!!") If intpesan = vbOK Then End Else Load form_aplikasi End If End Sub Private Sub Form_Load() cboDR.AddItem "Celcius" cboDR.AddItem "Reaumur" cboDR.AddItem "Fahrenheit" cboDR.AddItem "Kelvin" cboKE.AddItem "Celcius" cboKE.AddItem "Reaumur" cboKE.AddItem "Fahrenheit" cboKE.AddItem "Kelvin" cmdhitung.Enabled = False cmdKeluar.Enabled = False cmdBersih.Enabled = False cmdhasil.Enabled = False End Sub
cmdhitung.Enabled = True cmdKeluar.Enabled = True cmdBersih.Enabled = True End Sub Private Sub tmr_carakerja_Timer() lbl_carakerja.Visible = Not lbl_carakerja.Visible End Sub Private Sub tmr_judul_Timer() lbl_judul.Left = lbl_judul.Left - 15 If lbl_judul.Left <= -lbl_judul.Left Then lbl_judul.Left = form_aplikasi.Width End If End Sub
TERIMA KASIH