hey, im currently working on a maths game and i have no idea how to make a highscore list that can sort the scores from highest to lowest. i need help badly as my proejct is soon to be due. i dont really know what you need to see to help me but heres my code anyway. so far this is what ive done..
CODE
Module Module1
Public playername As String
Public score As Integer
Public high As Integer
Public playername2 As String
Public score2 As Integer
Public high2 As Integer
End Module
CODE
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
lblTime.Text = lblTime.Text - 1
If lblTime.Text = 0 Then
Timer1.Enabled = False
Me.Hide()
If score > high Then
high = score
Formplayer.Show()
Else
MsgBox("Your Score is lower than Highscore. Please Try Again")
FormHighScore.Show()
End If
End If
End Sub
CODE
Public Class Formplayer
Private Sub cmdOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOk.Click
If TextBox1.Text = "" Then
MsgBox("enter your name")
Else
playername = TextBox1.Text
Me.Hide()
FormHighScore.Show()
End If
End Sub
CODE
Private Sub lblTime(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
lbltime2.Text = lbltime2.Text - 1
If lbltime2.Text = 0 Then
Timer1.Enabled = False
Me.Hide()
If score2 > high2 Then
high2 = score2
Formplayer2.Show()
Else
MsgBox("Your Score is lower than Highscore. Please Try Again")
FormHighScore.Show()
End If
End If
End Sub
CODE
Public Class Formplayer2
Private Sub cmdOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOk.Click
If TextBox1.Text = "" Then
MsgBox("enter your name")
Else
playername2 = TextBox1.Text
Me.Hide()
FormHighScore.Show()
End If
TextBox1.Text = ""
End Sub
CODE
Private Sub FormHighScore_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.VisibleChanged
lblPlayer.Text = playername
lblscore.Text = high
lblplayer2.Text = playername2
lblscore2.Text = high2
End Sub
if im missing something u need to see ill post it up. thx for ur time