tugas visual basic
no.1
- Private Sub Form_Activate()
Dim c As Integer
c = 1
Do While c < 20
c = c + 2 Continue reading
TUGAS VISUAL BASIC
NAMA : DEVI YUNITA
NPM. : 11100137
KELAS : YAHOO 3
PROGRAM TIKET PENJUALAN KERETA API
Private Sub cmdproses_Click()
Dim k As String
k = Left(txtkt.Text, 3)
If k = “bim” Then
txtht.Text = “50000”
txtjk.Text = “BIMA”
txtjb.Text = “16.00”
ElseIf k = “eko” Then
txtht.Text = “35000”
txtjk.Text = “EKONOMI”
txtjb.Text = “19.00”
ElseIf k = “sen” Then
txtht.Text = “15000”
txtjk.Text = “SENJA”
txtjb.Text = “20.00”
ElseIf k = “mut” Then
txtht.Text = “23000”
txtjk.Text = “MUTIARA”
txtjb.Text = “17.00”
End If
txtjt.SetFocus
End Sub
Private Sub txtjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotalp.Text = Val(txtht.Text) * Val(txtjt.Text)
End If
End Sub
Private Sub cmdkeluar_Click()
Unload Me
End Sub
Private Sub cmdlagi_Click()
txtkt.SetFocus
txtkt = “”
txtht = “”
txtjk = “”
txtjb = “”
txtjb = “”
txttotalp = “”
End Sub
PROGRAM PERKALIAN DUA BILANGAN
1. SEBELUM DIJALANKAN
2. SETELAH DIJALANKAN
LISTING PROGRAM
Private Sub CmdBersih_Click()
txtbil1.Text = “”
txtbil2.Text = “”
Txthasil.Text = “”
End Sub
Private Sub cmdexit_Click()
End
End Sub
Private Sub cmdHitung_Click()
Txthasil.Text = Val(txtbil1.Text) * (txtbil2.Text)
End Sub
Private Sub Form_Load()
End Sub
PROGRAM MICROSOFT VISUALL BASIC
1. SEBELUM DIJALANKAN
2. SETELAH DIJALANKAN
LISTING PROGRAM
Private Sub chkbold_Click()
If chkbold.Value = 1 Then
lblvb.FontBold = True
Else
lblvb.FontBold = False
End If
End Sub
Private Sub chkitalic_Click()
If chkitalic.Value = 1 Then
lblvb.FontItalic = True
Else
lblvb.FontItalic = False
End If
End Sub
Private Sub chkstrike_Click()
If chkstrike.Value = 1 Then
lblvb.FontStrikethru = True
Else
lblvb.FontStrikethru = False
End If
End Sub
Private Sub chkUnder_Click()
If chkUnder.Value = 1 Then
lblvb.FontUnderline = True
Else
lblvb.FontUnderline = False
End If
End Sub
Private Sub cmdkeluar_Click()
End
End Sub
Private Sub Form_Load()
End Sub
Private Sub optred_Click()
lblvb.ForeColor = vbRed
End Sub
Private Sub optblue_Click()
lblvb.ForeColor = vbBlue
End Sub
Private Sub optgreen_Click()
lblvb.ForeColor = vbGreen
End Sub
Private Sub optyellow_Click()
lblvb.ForeColor = vbYellow
End Sub
Hello world!
Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.
Here are some suggestions for your first post.
- You can find new ideas for what to blog about by reading the Daily Post.
- Add PressThis to your browser. It creates a new blog post for you about any interesting page you read on the web.
- Make some changes to this page, and then hit preview on the right. You can always preview any post or edit it before you share it to the world.




