Advertisement
Guest User

Untitled

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