T
Tom
Hey,
I have a treeview control which i am reading and writing slots to (Its a
player manager for Delta Force Black Hawk Down).
At the moment, every 100ms it reads through the games memory to retreive
the player info, which i can parse. Problem is is that if you have an
item selected, when it clears and remakes all the nodes it deselects the
one selected, making it pretty useless to select players to view details.
Does anyone have a foolproof method to update a treeview while keeping
the currently selected node selected?
/// Begin Code
Dim L As Long
Dim hostvalue As Long
Dim player As Long
Dim name As String
hostvalue = ReadALong(&H7120C0)
tvPlayers.Nodes("root").Nodes.Clear()
For L = 0 To 49
player = hostvalue + (668 * L)
name = ReadAscii(player + 200, 16)
If name <> "" Then
Dim newnode As TreeNode = New TreeNode
newnode.Text = L + 1 & ") " & name
newnode.Tag = player
tvPlayers.Nodes("root").Nodes.Add(newnode)
End If
Next L
Cheers
Tom
I have a treeview control which i am reading and writing slots to (Its a
player manager for Delta Force Black Hawk Down).
At the moment, every 100ms it reads through the games memory to retreive
the player info, which i can parse. Problem is is that if you have an
item selected, when it clears and remakes all the nodes it deselects the
one selected, making it pretty useless to select players to view details.
Does anyone have a foolproof method to update a treeview while keeping
the currently selected node selected?
/// Begin Code
Dim L As Long
Dim hostvalue As Long
Dim player As Long
Dim name As String
hostvalue = ReadALong(&H7120C0)
tvPlayers.Nodes("root").Nodes.Clear()
For L = 0 To 49
player = hostvalue + (668 * L)
name = ReadAscii(player + 200, 16)
If name <> "" Then
Dim newnode As TreeNode = New TreeNode
newnode.Text = L + 1 & ") " & name
newnode.Tag = player
tvPlayers.Nodes("root").Nodes.Add(newnode)
End If
Next L
Cheers
Tom