OS Exercise 1 - Input 5 Integers and sort it from Highest to Lowest.
15/12/2009 12:13Solution:
Public Class Form1
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim x As Integer
Dim mine As Integer
For x = 1 To 5
mine = InputBox("Enter the Integer:")
ListView1.Items.Add(mine)
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If RadioButton1.Checked = True Then
ListView1.Sorting = SortOrder.Ascending
Else
ListView1.Sorting = SortOrder.Descending
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
RadioButton1.Checked = True
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedToolWindow
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
———
Back