Hey guys,

I've got a multithreaded application done in C# but the label on one of my forms won't update! It doesn't do anything

public IndividualPCSpec(AllKnownDevicesFrm parent)
            m_Parent = parent;
            m_IPAddressLbl.Text = "HELLO";

        public void showInformation(ComputerHardware dto) 
            m_IPAddressLbl.Text = "HELLO WORLD";


I don't get why.... it doesn't even get set to "Hello" :S

from another class.

Class X
IndividualPCSpec m_individualPC = new IndividualPCSpec (this);
ComputerHardware  dto = new ComputerHardware(...);
Function X() 

If you attach a debugger, does it show the line m_IPAddressLbl.Text = "HELLO WORLD"; running?

Normally updating labels in a form is not a thread-safe operation. Check this article out:


That may give you a good idea of what you have to do to update the label. You need to invoke another method to update the label's text. I'm surprised an exception is not being thrown...