Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Latihan10
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim x%
- x = TextBox1.Text
- Do
- x = x Mod 2
- If x = 0 Then
- MsgBox("Genap")
- Exit Do
- ElseIf x = 1 Then
- MsgBox("Ganjil") 'laptopinformatika.com
- Exit Do
- End If
- Loop While Not x
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- TextBox1.Text = ""
- End Sub
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- Dim result As Integer = MsgBox("Apakah Anda Sudah Yakin Mau Keluar? ", MsgBoxStyle.Information + MsgBoxStyle.OkCancel, "Informasi")
- If result = DialogResult.OK Then
- Me.Close()
- Else
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement