Sabtu, 18 Juli 2009

Modul IX

1. Buat rancangan antar muka seperti berikut.


2. Duble klik CMD Proses
3. Ketikkan Program berikut :

Private Sub Command1_Click()
Dim nama As String
Dim TB, BB, BI, B As Single
nama = Text1.Text
TB = Val(Text2.Text)
BB = Val(Text3.Text)
BI = (TB - 110) * 1.1
If (BB > (1.1 * BI)) Then
Text4.Text = "Hallo " + nama + " Anda GEMUK juga yah..."
Else
If (BB < (0.9 * BI)) Then Text4.Text = "Hallo " + nama + " Anda KURUS Banget..."
Else
Text4.Text = "Hallo " + nama + " Anda IDEAL juga ternyata..."
End If
End If
End Sub

Private Sub Command2_Click()

Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""

End Sub
Private Sub Command3_Click()
MsgBox "apa ANDA yakin ingin keluar.?", vbOKCancel + vbQuestion, "KONFIRMASI"

End
End Sub

Private Sub Form_Load()
End Sub
4. Hasilnya Seperti Berikut

0 komentar:

script type=”text/javascript”> //form tags to omit in NS6+: var omitformtags=["input", "textarea", "select"] omitformtags=omitformtags.join(”|”) function disableselect(e){ if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1) return false } function reEnable(){ return true } if (typeof document.onselectstart!=”undefined”) document.onselectstart=new Function (”return false”) else{ document.onmousedown=disableselect document.onmouseup=reEnable }

  © Laporan Praktikum by pemerograman1.blogspot.com/ 2009

Back to TOP