TUTORIAL MEMBUAT PROGRAM SEDERHANA DENGAN KONDISI IF THEN ELSE PADA VISUAL BASIC 6

TUTORIAL :
1. buka aplikasi vb 6
2.buat new project,standar x
3. tambahkan 3 text,3label,1 command
4. Atur property label,textbox,dan command button;
Label 1 captionny nilai A
Label 2 caption nilai B
Label 3 caption hasil
Command 1 captionny lihat hasil
5.masukkan kode program pada command button seperti di bawah ini :
Private Sub Command1_Click()
Private Sub Command1_Click()
Dim a, b As Integer
Dim hasil As String
a = Text1.Text
b = Text2.Text
If a > b Then
hasil = "nilai A lebih
besar dari nilai B"
Else
hasil = "nilai B lebih
besar dari nilai A"
End If


Komentar
Posting Komentar