A
Anders Eriksson
Hello,
I use an COM server that creates a number of events. I have created a class
that controls the COM server and that receives the events, it's called
LaserCtrl. This works!
I have a form that uses LaserCtrl and I want to update a textbox in the form
from LaserCtrl. The constructor of LaserCtrl looks like this
private TextBox msg;
public LaserCtrl(TextBox m)
{
msg = m;
}
From a normal method in LaserCtrl this works perfectly
msg.Text = "my nice message";
BUT from the EventHandler method nothing happens! I'm guessing that this is
because the eventhandler method is in another thread?
How do I solve this?
// Anders
--
English is not my first language, so any
insults or strangeness is due to the translation!
--
--
Anders Eriksson
DC Lasersystem
Software Engineer
073 029 45 74
(e-mail address removed)
I use an COM server that creates a number of events. I have created a class
that controls the COM server and that receives the events, it's called
LaserCtrl. This works!
I have a form that uses LaserCtrl and I want to update a textbox in the form
from LaserCtrl. The constructor of LaserCtrl looks like this
private TextBox msg;
public LaserCtrl(TextBox m)
{
msg = m;
}
From a normal method in LaserCtrl this works perfectly
msg.Text = "my nice message";
BUT from the EventHandler method nothing happens! I'm guessing that this is
because the eventhandler method is in another thread?
How do I solve this?
// Anders
--
English is not my first language, so any
insults or strangeness is due to the translation!
--
--
Anders Eriksson
DC Lasersystem
Software Engineer
073 029 45 74
(e-mail address removed)