Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Public Class Latihan6
  2. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  3. Dim x As Integer
  4. x = 1
  5. While x <= 10
  6. ListBox1.Items.Add(x)
  7. x = x + 1
  8. End While
  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