Scrip Tugas Kuliah Minggu Ke - 3.,,,
Menselekasi Hasil bagi,,,,:
Belum ada gambarnya, Cz ga bisa di UPlod sama gambarnya,,,!!!
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim j As Integer
ListBox1.Items.Clear()
For j = Val(TextBox1.Text) To Val(TextBox2.Text)
If j Mod 9 = 0 And j Mod 27 = 0 Then
ListBox1.Items.Add(j)
End If
Next
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim j As Integer
ListBox1.Items.Clear()
For j = Val(TextBox1.Text) To Val(TextBox2.Text)
If j Mod 2 = 3 Then
ListBox1.Items.Add(j)
End If
Next
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox1.Text = ""
TextBox2.Text = ""
ListBox1.Items.Clear()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
End
End Sub
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then
TextBox2.Focus()
End If
End Sub
End Class
Menselekasi Hasil bagi,,,,:
Belum ada gambarnya, Cz ga bisa di UPlod sama gambarnya,,,!!!
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim j As Integer
ListBox1.Items.Clear()
For j = Val(TextBox1.Text) To Val(TextBox2.Text)
If j Mod 9 = 0 And j Mod 27 = 0 Then
ListBox1.Items.Add(j)
End If
Next
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim j As Integer
ListBox1.Items.Clear()
For j = Val(TextBox1.Text) To Val(TextBox2.Text)
If j Mod 2 = 3 Then
ListBox1.Items.Add(j)
End If
Next
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox1.Text = ""
TextBox2.Text = ""
ListBox1.Items.Clear()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
End
End Sub
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then
TextBox2.Focus()
End If
End Sub
End Class