Pages

Selasa, 15 Maret 2011

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
Print Friendly and PDF

Artikel Terkait:

0 komentar:

Posting Komentar

Related Posts Plugin for WordPress, Blogger...