Hi
The procedure below is called when a user disconnects and the control
program trys to remove them from the hashtable
There are no errors but the .Remove option does not remove the entry from
the table, any ideas please.
Private clients As New Hashtable
Private Sub DisconnectUser(ByVal userName As String, ByVal sender As
UserConnection)
Dim client As UserConnection
Dim entry As DictionaryEntry
Try
UpdateOutStatus(userName & " has disconnected.")
For Each entry In clients
client = CType(entry.Value, UserConnection) '
If client.Name.ToString = userName Then
clients.Remove(entry)
End If
Next
reBuildConList()
Catch ex As Exception
ErrorBox(ex.Message)
End Try
End Sub
--
Kevin Martin
Motor Trade Technologies