Sebelumnya saya sudah share materi tentang looping pada visual studio.net
Buat design form nya seperti diatas lalu buat 3 buah combobox.
//Untuk isi combobox1
Dim a As Integer a = 1 While a <= 31 ComboBox1.Items.Add(a) a = a + 1 end while//Untuk isi Combobox2
For a = 1 To 12 ComboBox2.Items.Add(MonthName(a)) Next//Untuk Combobox3
For a = 1 To 7 ComboBox3.Items.Add(WeekdayName(a)) Next
Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim a As Integer a = 1 While a <= 31 ComboBox1.Items.Add(a) a = a + 1 End While For a = 1 To 12 ComboBox2.Items.Add(MonthName(a)) Next For a = 1 To 7 ComboBox3.Items.Add(WeekdayName(a)) Next End Sub End Class
Silahkan compile, dan terima kasih.
Jangan Lupa Commentnya. Pertanyaan ajukan dibawah aja
0 Response to "Latihan Visual Studio.NET : Pengaplikasin Looping"
Post a Comment