1. Suatu control label memiliki nama LblNama. Perintah untuk merubah tulisan pada label tersebut adalah…
a. LblNama.text
b. LblNama.caption
c. Label1.text
d. Label1.caption
e. Label1.name
Jawaban b
Control tersebut sudah diberi nama LblNama sehingga namanya bukan lagi label1. Perintah .text ada pada textbox bukan pada l;abel. Perintah .name digunakan untuk mengubah nama control bukan tulisan pada control tsb
2. Control yang berfungsi untuk menampung input atau output berupa tulisan adalah…
a. Label
b. Command button
c. Textbox
d. Check box
e. Listbox
Jawaban c
3. Control berikut memiliki properties caption kecuali…
a. Label
b. Command button
c. Frame
d. Option button
e. Textbox
Jawaban e
Control textbox tidak memiliki property caption melainkan text
4. Dalam suatu sub rutin form load diberikan perintah sebagai berikut :
Combo1.additem “satu”
Combo1.additem “dua”
Combo1.additem “tiga”
Combo1.additem “empat”
Combo1.additem “lima”
Yang memiliki index 2 pada item combo 1 tersebut adalah…
a. Satu
b. Dua
c. Tiga
d. Empat
e. Lima
Jawaban c
Satu = 0
Dua = 1
Tiga =2
5. Langkah untuk menambahkan ADO data controller adalah…
a. File – ADO
b. Insert – component – ADO
c. Project – component – ADO
d. File – import – ADO
e. Window – ADO
Jawaban c
6. Yang bukan merupakan bagian IDE Visual Basic adalah...
a. Code window
b. Properties window
c. Timeline windows
d. Control toolbox
e. Form window
Jawaban c
Timeline terdapat pada Flash
7. Perintah untuk keluar dari aplikasi yang kita buat adalah…
a. Exit
b. Remove
c. Quit
d. Out
e. Unload
Jawaban e
Perintah lengkapnya adalah unload me
8. Aplikasi berikut dibangun dengan dua buah control label dan dua buah textbox. Perintah untuk menampilkan hasil luas segitiga idealnya ditulis dalam sub rutin…
a. label1
b. label2
c. Text1
d. Text2
e. Form
Jawban d
User biasanya akan mengisi text 1 kemudian text 2 setelah itu menekan enter maka perintah diberikan pada subrutin text2_change
9. Pada aplikasi no.8 di atas hasil perhitungan luas akan ditampung dalam variable luas. Perintah untuk menghitung luas pada aplikasi di atas adalah…
a. Luas=A*T/2
b. Luas=Val(Label1*label2)/2
c. Luas = Val (text1*text)/2
d. Luas=Val(text1)*val(text2):2
e. Luas=Val(text1)*val(text2)/2
Jawaban e
Perintah operasi pembagian pada BASIC menggunakan “/” Val=value = nilai jika digunakan tanpa val maka bukan harga (value) yang dihitung melainkan isi (string nya)
10. Control check box memiliki properti harga (value) sebanyak…
a. 1
b. 2
c. 3
d. 4
e. 5
Jawaban c
0=unchecked (tidak dipilih)
1=checked (dipilih)
2 = grey (inaktif)
v
Tampilkan postingan dengan label visual prog. Tampilkan semua postingan
Tampilkan postingan dengan label visual prog. Tampilkan semua postingan
Pembahasan UTS
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim luas, luas1, luas2, luas3, luas4, hasil As Variant
Text3.Visible = False
Label4.Visible = False
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If MsgBox("Anda Yakin Akan Keluar", vbYesNo, "Peringatan!!!") = vbNo Then
Cancel = True
End If
End Sub
Private Sub Option1_Click()
If Option1.Value = True And Option5.Value = True Then
Text3.Visible = False
Label4.Visible = False
Label2.Caption = "Alas"
Label3.Caption = "Tinggi"
Label3.Visible = True
Text2.Visible = True
Label1.Caption = "HITUNG LUAS"
Else
If Option1.Value = True And Option6.Value = True Then
Text3.Visible = True
Label2.Caption = "Sisi 1"
Label3.Caption = "Sisi 2"
Label4.Caption = "Sisi 3"
Label4.Visible = True
Label3.Visible = True
Text2.Visible = True
Label1.Caption = "HITUNG KELILING"
End If
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True And Option5.Value = True Then
luas = luas2
Label2.Caption = "Jari-Jari"
Label3.Visible = False
Text2.Visible = False
Label4.Visible = False
Text3.Visible = False
Label1.Caption = "HITUNG LUAS"
Else
If Option2.Value = True And Option6.Value = True Then
Label2.Caption = "Jari-Jari"
Label3.Visible = False
Label4.Visible = False
Text2.Visible = False
Text3.Visible = False
Label1.Caption = "HITUNG KELILING"
End If
End If
End Sub
Private Sub Option3_Click()
If Option3.Value = True And Option5.Value = True Then
Label2.Caption = "Sisi"
Label3.Visible = False
Text2.Visible = False
Text3.Visible = False
Label4.Visible = False
Label1.Caption = "HITUNG LUAS"
Else
If Option3.Value = True And Option6.Value = True Then
Label2.Caption = "Sisi"
Label3.Visible = False
Text2.Visible = False
Text3.Visible = False
Label4.Visible = False
Label1.Caption = "HITUNG KELILING"
End If
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True And Option5.Value = True Then
Label2.Caption = "Panjang"
Label3.Caption = "lebar"
Label3.Visible = True
Text2.Visible = True
Text3.Visible = False
Label4.Visible = False
Label1.Caption = "HITUNG LUAS"
Else
If Option4.Value = True And Option6.Value = True Then
Label2.Caption = "Panjang"
Label3.Caption = "lebar"
Label3.Visible = True
Text2.Visible = True
Text3.Visible = False
Label4.Visible = False
Label1.Caption = "HITUNG KELILING"
End If
End If
End Sub
Private Sub Option5_Click()
If Option5.Value = True Then
Label1.Caption = "HITUNG LUAS"
End If
If Option1.Value = True And Option5.Value = True Then
Text3.Visible = False
Label4.Visible = False
Label2.Caption = "Alas"
Label3.Caption = "Tinggi"
End If
End Sub
Private Sub Option6_Click()
If Option1.Value = True And Option6.Value = True Then
Text3.Visible = True
Label2.Caption = "Sisi 1"
Label3.Caption = "Sisi 2"
Label4.Caption = "Sisi 3"
Label4.Visible = True
Label3.Visible = True
Text2.Visible = True
Label1.Caption = "HITUNG KELILING"
End If
End Sub
Private Sub command1_click()
If Option1.Value = True And Option5.Value = True Then
hasil = Val(Text1) * Val(Text2) * 0.5
Else
If Option1.Value = True And Option6.Value = True Then
hasil = Val(Text1) + Val(Text2) + Val(Text3)
Else
If Option2.Value = True And Option5.Value = True Then
hasil = ((Val(Text1)) ^ 2) * (22 / 7)
Else
If Option2.Value = True And Option6.Value = True Then
hasil = (22 / 7) * Val(Text1) * 2
Else
If Option3.Value = True And Option5.Value = True Then
hasil = Val(Text1) ^ 2
Else
If Option3.Value = True And Option6.Value = True Then
hasil = 4 * Val(Text1)
Else
If Option4.Value = True And Option5.Value = True Then
hasil = Val(Text1) * Val(Text2)
Else
If Option4.Value = True And Option6.Value = True Then
hasil = (Val(Text1) + Val(Text2)) * 2
End If
End If
End If
End If
End If
End If
End If
End If
MsgBox "hasil Perhitungan adalah : " & hasil
Text1.Text = Clear
Text2.Text = Clear
Text3.Text = Clear
Text1.SetFocus
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call command1_click
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call command1_click
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call command1_click
End If
End Sub
>>>script ini msh belum sempurna...
>>>bagi yg belum mengumpulkan UTS agar segera mengumpulkn UTS praktek (hitung luas)..
jika tdk maka nilai UTS anda = 0
Unload Me
End Sub
Private Sub Form_Load()
Dim luas, luas1, luas2, luas3, luas4, hasil As Variant
Text3.Visible = False
Label4.Visible = False
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If MsgBox("Anda Yakin Akan Keluar", vbYesNo, "Peringatan!!!") = vbNo Then
Cancel = True
End If
End Sub
Private Sub Option1_Click()
If Option1.Value = True And Option5.Value = True Then
Text3.Visible = False
Label4.Visible = False
Label2.Caption = "Alas"
Label3.Caption = "Tinggi"
Label3.Visible = True
Text2.Visible = True
Label1.Caption = "HITUNG LUAS"
Else
If Option1.Value = True And Option6.Value = True Then
Text3.Visible = True
Label2.Caption = "Sisi 1"
Label3.Caption = "Sisi 2"
Label4.Caption = "Sisi 3"
Label4.Visible = True
Label3.Visible = True
Text2.Visible = True
Label1.Caption = "HITUNG KELILING"
End If
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True And Option5.Value = True Then
luas = luas2
Label2.Caption = "Jari-Jari"
Label3.Visible = False
Text2.Visible = False
Label4.Visible = False
Text3.Visible = False
Label1.Caption = "HITUNG LUAS"
Else
If Option2.Value = True And Option6.Value = True Then
Label2.Caption = "Jari-Jari"
Label3.Visible = False
Label4.Visible = False
Text2.Visible = False
Text3.Visible = False
Label1.Caption = "HITUNG KELILING"
End If
End If
End Sub
Private Sub Option3_Click()
If Option3.Value = True And Option5.Value = True Then
Label2.Caption = "Sisi"
Label3.Visible = False
Text2.Visible = False
Text3.Visible = False
Label4.Visible = False
Label1.Caption = "HITUNG LUAS"
Else
If Option3.Value = True And Option6.Value = True Then
Label2.Caption = "Sisi"
Label3.Visible = False
Text2.Visible = False
Text3.Visible = False
Label4.Visible = False
Label1.Caption = "HITUNG KELILING"
End If
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True And Option5.Value = True Then
Label2.Caption = "Panjang"
Label3.Caption = "lebar"
Label3.Visible = True
Text2.Visible = True
Text3.Visible = False
Label4.Visible = False
Label1.Caption = "HITUNG LUAS"
Else
If Option4.Value = True And Option6.Value = True Then
Label2.Caption = "Panjang"
Label3.Caption = "lebar"
Label3.Visible = True
Text2.Visible = True
Text3.Visible = False
Label4.Visible = False
Label1.Caption = "HITUNG KELILING"
End If
End If
End Sub
Private Sub Option5_Click()
If Option5.Value = True Then
Label1.Caption = "HITUNG LUAS"
End If
If Option1.Value = True And Option5.Value = True Then
Text3.Visible = False
Label4.Visible = False
Label2.Caption = "Alas"
Label3.Caption = "Tinggi"
End If
End Sub
Private Sub Option6_Click()
If Option1.Value = True And Option6.Value = True Then
Text3.Visible = True
Label2.Caption = "Sisi 1"
Label3.Caption = "Sisi 2"
Label4.Caption = "Sisi 3"
Label4.Visible = True
Label3.Visible = True
Text2.Visible = True
Label1.Caption = "HITUNG KELILING"
End If
End Sub
Private Sub command1_click()
If Option1.Value = True And Option5.Value = True Then
hasil = Val(Text1) * Val(Text2) * 0.5
Else
If Option1.Value = True And Option6.Value = True Then
hasil = Val(Text1) + Val(Text2) + Val(Text3)
Else
If Option2.Value = True And Option5.Value = True Then
hasil = ((Val(Text1)) ^ 2) * (22 / 7)
Else
If Option2.Value = True And Option6.Value = True Then
hasil = (22 / 7) * Val(Text1) * 2
Else
If Option3.Value = True And Option5.Value = True Then
hasil = Val(Text1) ^ 2
Else
If Option3.Value = True And Option6.Value = True Then
hasil = 4 * Val(Text1)
Else
If Option4.Value = True And Option5.Value = True Then
hasil = Val(Text1) * Val(Text2)
Else
If Option4.Value = True And Option6.Value = True Then
hasil = (Val(Text1) + Val(Text2)) * 2
End If
End If
End If
End If
End If
End If
End If
End If
MsgBox "hasil Perhitungan adalah : " & hasil
Text1.Text = Clear
Text2.Text = Clear
Text3.Text = Clear
Text1.SetFocus
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call command1_click
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call command1_click
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call command1_click
End If
End Sub
>>>script ini msh belum sempurna...
>>>bagi yg belum mengumpulkan UTS agar segera mengumpulkn UTS praktek (hitung luas)..
jika tdk maka nilai UTS anda = 0
Contoh UTS Pemrograman Visual
Berikut adalah contoh tampilan yang diharapkan untuk Tugas UTS Visual Prog. Label "panjang", "lebar", "alas","tinggi" berubah ubah sesuai kebutuhan.
Tugas yang dibuat tidak harus sama persis. Batas waktu pengumpulan 11 Oktober 2009 dikirim ke email virtuaclass@gmail.com atau rik_pratama@yahoo.co.id. File yang dikirim adalah file executable (*.exe). Setiap keterlambatan akan dikenakan pengurangan nilai.

Tugas yang dibuat tidak harus sama persis. Batas waktu pengumpulan 11 Oktober 2009 dikirim ke email virtuaclass@gmail.com atau rik_pratama@yahoo.co.id. File yang dikirim adalah file executable (*.exe). Setiap keterlambatan akan dikenakan pengurangan nilai.
Langganan:
Postingan (Atom)
Easus Partition Manager:Software Partisi Hardisk Gratis
Drive C anda menipis? Salah setting partisi saat install windows? Ga perlu kuatir, dengan software partisi hardisk gratis ini semua bisa dia...
-
Drive C anda menipis? Salah setting partisi saat install windows? Ga perlu kuatir, dengan software partisi hardisk gratis ini semua bisa dia...
-
BLOG atau lengkapnya weblog, adalah sebuah aplikasi web yang memuat secara periodik tulisan-tulisan (posting) pada sebuah webpage umum. Post...
-
Like my promise..Hari ini saya lanjutin tulisan saya kemarin. Saat kita coba melamar ke sebuah radio kadang kita diminta untuk megirimkan...