Benn
2011-12-23 07:18:45 UTC
At the moment, my high scores is set out with the username on one line, then the score on the next line.
This is the code which is used for the scores:
---------------------------------------
Private Sub frmHighScores_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'sort array of records
Dim comp As New ScoresComparer
Array.Sort(frmRegistration.Accounts, comp)
'display all records in listbox
For ScoresCounter = 0 To 99
If frmRegistration.Accounts(ScoresCounter).strUsername <> Nothing Then
lstHighScores.Items.Add(frmRegistration.Accounts(ScoresCounter).strUsername)
lstHighScores.Items.Add(frmRegistration.Accounts(ScoresCounter).intScore)
End If
Next
End Sub
--------------------------------------
This lays out my scores like this:
Ben
14
James
13
Jake
12
I would like my highscores to be layed out like this:
Ben - 14
James - 13
Jake - 12
Can anybody help me with a solution to this problem?
Thanks in advance!