void vj_engine_VowelGenerated(PatternDataCLR patternData)
{
if (this.InvokeRequired)
{
this.BeginInvoke(new VJEngineCLR_vowelGenerated(vj_engine_VowelGenerated), new object[] { patternData });
return;
}
}
In .NET 3.0:
http://www.codeproject.com/KB/cpp/SyncContextTutorial.aspx
using System.ComponentModel;
...
namespace MyNamespace
{
...
public class MyClass
{
AsyncOperation operation;
...
public MyClass()
{
operation = AsyncOperationManager.CreateOperation(null);
...
}
void nonUIThreadEvent(...)
{
operation.Post(new System.Threading.SendOrPostCallback(delegate(object state)
{
// do something
}), null);
}
}
}
No comments:
Post a Comment