I am making a game in Visual Basic that has to contain a high score table.
I am using a ListView
control named lstscores
to store rows of scores in 2 columns called Name
and Score
.
The user has to guess words that are entered into a ListBox called lstwords
when correct.
I have set up 2 things in Application.Settings
: settingname
and settingscore
both with type: System.Collections.Specialized.StringCollectino
, Scope: user
and Value: Nothing
.
When user clicks on a save button, I basically want to take the username and score and store it in the settings respectively. So when I open the form up next time I can load the settings back into the same ListView
control.
I have been researching for a few hours, and I haven't been able to find anything exactly suited to my needs.
I cannot provide my code, as i have tried everything possible to my knowledge, and nothing has worked.
If someone could please give me advice or a direction on how to go about doing this, I would be very grateful.
Thanks
Dim arr(1) As String
Dim score As Integer
inputname = txtname.Text
score = lstwords.Items.Count
arr(0) = inputname
arr(1) = score
lstscores.Items.Add(New ListViewItem(arr))