i think you must change your strategy to achieve your needs.
i am talking about desktop application, UI thread is a class that creates an instance of fastreport class, fastreport script is another class and work as plugin in and internally used by fastreport class.
UI thread creates an instance of fastreport class, we can control that
fastreport creates an instance of fastreport script class, UI thread can't take a control.
it's very easy to use, UI thread register a global event, and if another class send a message then UI thread will execute a method/function, the rest is yours.
in fastreport script, send a message (value of zm) to UI thread, for example : a code like this:
private void Text2_Click(object sender, EventArgs e)
{
//send zm value to ui thread
}
Comments
I want to read 'zm' like
int v = Report.zm
i am talking about desktop application, UI thread is a class that creates an instance of fastreport class, fastreport script is another class and work as plugin in and internally used by fastreport class.
UI thread creates an instance of fastreport class, we can control that
fastreport creates an instance of fastreport script class, UI thread can't take a control.
the question is : how to communicate between classes which is created independently?
I use MVVMLight toolkit, read http://social.technet.microsoft.com/wiki/c...en-classes.aspx
it's very easy to use, UI thread register a global event, and if another class send a message then UI thread will execute a method/function, the rest is yours.
in fastreport script, send a message (value of zm) to UI thread, for example : a code like this:
private void Text2_Click(object sender, EventArgs e)
{
//send zm value to ui thread
}