Category Archives: Visual Basic

Modul VB – Latihan Soal Program “7 Miracle of World”

Buat program menampilkan data 7 keajaiban dunia dengan ketentuan sebagai berikut:

Object Place Description
Borobudur Temple Central Java, Indonesia. Borobudur is a ninth-century Mahayana Buddhist monument in Magelang,
Tower of Pisa Pisa. Italy Tower of Pisa is the campanile, or freestanding bell tower, of the cathedral of the Italian city of Pisa.
Eiffel Tower Paris, French The Eiffel Tower is a 19th century iron lattice tower located on the Champ de Mars in Paris.
Great Wall China Great Wall is a series of stone and earthen fortifications in northern China
Taj Mahal Agra, India Taj Mahal is a mausoleum located in Agra, India, built by Mughal Emperor Shah Jahan in memory of his favorite wife, Mumtaz Mahal.
Pyramid Egypt A pyramid is a building where the outer surfaces are triangular and converge at a point.
Kaaba Mecca, Saudi Arabia The building predates Islam, and, according to Islamic tradition, the first building at the site was built by Abraham

Jawaban

Pengaturan Properti

Obyek Properti Pengaturan
Form Caption 7 Miracle
Label1 Caption Object
Combo1 Text (Kosongkan)
Label2 Caption Place
Label3 Caption Descriptiom
Text1 Text (Kosongkan)
Backcolor (Pilih merah muda)
Text2 Text (Kosongkan)
Backcolor (Pilih merah muda)
Multiline True
Command1 Caption Close

Pengkodean

01 Private Sub Form_Load()
02 Combo1.AddItem "Borobudur Temple"
03 Combo1.AddItem "Tower of Pisa"
04 Combo1.AddItem "Eiffel Tower"
05 Combo1.AddItem "Great Wall"
06 Combo1.AddItem "Taj Mahal"
07 Combo1.AddItem "Pyramid"
08 Combo1.AddItem "Kaaba"
09 End Sub
10
11 Private Sub Combo1_Click()
12 Select Case Combo1.Text
13 Case "Borobudur Temple"
14 Text1.Text = "Central Java,Indonesia"
15 Text2.Text = "Borobudur is a ninth-century Mahayana Buddhist
16 monument in Magelang"
17 Case "Tower of Pisa"
18 Text1.Text = "Pisa, Italy"
19 Text2.Text = "Tower of Pisa is the campanile, or freestanding
20 bell tower, of the cathedral of the Italian city
21 of Pisa"
22 Case "Eiffel Tower"
23 Text1.Text = "Paris, French"
24 Text2.Text = "The Eiffel Tower is a 19th century iron lattice
25 tower located on the Champ de Mars in Paris."
26 Case "Great Wall"
27 Text1.Text = "China"
28 Text2.Text = "Great Wall is a series of stone and earthen
29 fortifications in northern China"
30 Case "Taj Mahal"
31 Text1.Text = "Agra, India"
32 Text2.Text = "Taj Mahal is a mausoleum located in Agra, India,
33 built by Mughal Emperor Shah Jahan in memory of
34 his favorite wife, Mumtaz Mahal."
35
36 Case "Pyramid"
37 Text1.Text = "Egypt"
38 Text2.Text = "A pyramid is a building where the outer surfaces
39 are triangular and converge at a point"
40 Case "Kaaba"
41 Text1.Text = "Mecca, Saudi Arabia"
42 Text2.Text = "The building predates Islam, and, according to
43 Islamic tradition, the first building at the site
44 was built by Abraham"
45 End Select
46 End Sub
47
48 Private Sub Command1_Click()
49 Unload Me
50 End Sub

source : fairuzelsaid.wordpress.com

Follow

Get every new post delivered to your Inbox.