Contoh VB3
Scrip
Public Class Form3
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles proses.Click
For i = 1 To Val(TextBox1.Text)
If i Mod 9 = 0 And i Mod 27 = 0 Then
ListBox1.Items.Add(i)
End If
Next
For i = 1 To Val(TextBox1.Text)
If i Mod 2 = 3 Then
ListBox3.Items.Add(i)
End If
Next
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
proses.Focus()
End If
End Sub
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click
End Sub
End Class
Tidak ada komentar:
Posting Komentar