Guest User

Untitled

a guest
Apr 23rd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. Public Class Form1
  2. Dim spis(6) As String
  3. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  4. clearList()
  5. Array.Sort(spis)
  6. For Each item As String In spis
  7. ListBox1.Items.Add(item)
  8. Next
  9.  
  10. End Sub
  11.  
  12. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  13. clearList()
  14. spis(0) = "Английски език"
  15. spis(1) = "Български език"
  16. spis(2) = "Математика"
  17. spis(3) = "История"
  18. spis(4) = "Физика"
  19. spis(5) = "Химия"
  20. spis(6) = "Биология"
  21. For Each item As String In spis
  22. ListBox1.Items.Add(item)
  23. Next
  24.  
  25. End Sub
  26. Private Sub clearList()
  27. ListBox1.Items.Clear()
  28. End Sub
  29.  
  30. Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  31. clearList()
  32. Array.Reverse(spis)
  33. For Each item As String In spis
  34. ListBox1.Items.Add(item)
  35. Next
  36. End Sub
  37. End Class
Add Comment
Please, Sign In to add comment