Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Public Class Latihan5
  2. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  3. Dim x, y As Integer
  4. For x = 1 To 3
  5. For y = 1 To 2
  6. ListBox1.Items.Add(x & y)
  7. Next y
  8. Next x
  9. End Sub
  10. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  11. Dim result As Integer = MsgBox("Apakah Anda Sudah Yakin Mau Keluar? ", MsgBoxStyle.Information + MsgBoxStyle.OkCancel, "Informasi")
  12. If result = DialogResult.OK Then
  13. Me.Close()
  14. Else
  15. End If
  16. End Sub
  17. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement