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

Private Sub Form_Load()
  Combo1.AddItem "Borobudur Temple"
  Combo1.AddItem "Tower of Pisa"
  Combo1.AddItem "Eiffel Tower"
  Combo1.AddItem "Great Wall"
  Combo1.AddItem "Taj Mahal"
  Combo1.AddItem "Pyramid"
  Combo1.AddItem "Kaaba"
End Sub
 
 
Private Sub Combo1_Click()
  Select Case Combo1.Text
    Case "Borobudur Temple"
       Text1.Text = "Central Java,Indonesia"
       Text2.Text = "Borobudur is a ninth-century Mahayana Buddhist 
                     monument in Magelang"
    Case "Tower of Pisa"
       Text1.Text = "Pisa, Italy"
       Text2.Text = "Tower of Pisa is the campanile, or freestanding 
                     bell tower, of the cathedral of the Italian city 
                     of Pisa"
    Case "Eiffel Tower"
       Text1.Text = "Paris, French"
       Text2.Text = "The Eiffel Tower is a 19th century iron lattice 
                     tower located on the Champ de Mars in Paris."
    Case "Great Wall"
       Text1.Text = "China"
       Text2.Text = "Great Wall is a series of stone and earthen 
                     fortifications in northern China"
    Case "Taj Mahal"
      Text1.Text = "Agra, India"
       Text2.Text = "Taj Mahal is a mausoleum located in Agra, India, 
                     built by Mughal Emperor Shah Jahan in memory of 
                     his favorite wife, Mumtaz Mahal."
    
 
    Case "Pyramid"
      Text1.Text = "Egypt"
      Text2.Text = "A pyramid is a building where the outer surfaces
                    are triangular and converge at a point"
    Case "Kaaba"
      Text1.Text = "Mecca, Saudi Arabia"
      Text2.Text = "The building predates Islam, and, according to 
                    Islamic tradition, the first building at the site 
                    was built by Abraham"
  End Select
End Sub
 
 
Private Sub Command1_Click()
  Unload Me
End Sub
About these ads

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

  1. Ping-balik: Modul VB – Latihan Soal Program “7 Miracle of World” « Saiful Anwar's blog

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Logout / Ubah )

Twitter picture

You are commenting using your Twitter account. Logout / Ubah )

Facebook photo

You are commenting using your Facebook account. Logout / Ubah )

Google+ photo

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s