Haaalllooooo guyss , kembali lagi di blog saya trimakasih telah membuka blog saya.
disni saya akan menjelaskan cara membuat perulangan di dalam vb.net.
kalian dapat melihat design dibawah ini
disni saya akan menjelaskan cara membuat perulangan di dalam vb.net.
kalian dapat melihat design dibawah ini
2. Lalu ketik koding program seperti yang dibawah ini :
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dountil.Click
Dim x As Integer
ListBox1.Items.Clear()
x = 1
Do Until x = 10
ListBox1.Items.Add(x)
x = x + 1
Loop
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim x As Integer
ListBox2.Items.Clear()
x = 1
Do While x <= 10
ListBox2.Items.Add(x)
x = x + 1
Loop
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim x As Integer
ListBox3.Items.Clear()
x = 1
While x <= 11
ListBox3.Items.Add(x)
x = x + 1
End While
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim x As Integer
ListBox4.Items.Clear()
For x = 1 To 10
ListBox4.Items.Add(x)
Next
End Sub
End Class
Sekian dan terimakasih :)