Changes made to listview in thread not visible

paul.wildthing

New member
Joined
Feb 23, 2011
Messages
1
Programming Experience
1-3
I'm making a client-server classroom testing system where the teacher acts as the server and during testing is shown a listview control of all pupils taking the test and then their score once they have submitted it. I have coded the server as a thread inside the same class as the listview however each connection is then coded as an instance of a client class which is then used for another thread inside the server thread. The problem I've got is that while in debugging the thread in the client class is clearly entering the details correctly, however this change is not reflected in the listview on the form. It could be to do with the way I'm using the threads as I'm pretty new to them, has anyone got any ideas?

The other problem I have is that in another part of the system I have an array of dynamically created buttons which I want to disable on the click of another button. The code I've used is:

VB.NET:
For Each Button In ContestButtons
            Button.Enabled = False
        Next

When I run it however I get a "object reference not set to an instance of an object" or something along those lines, I can't quite remember it! I think this is probably a quick fix but I've got no ideas.
 
Back
Top