S
Sin Jeong-hun
class Engine
{
Thread Worker;
public event ... EngineMessage;
public void Start()
{
Worker=new Thread(new ThreadStart(Run));
Worker.Start();
}
private Run()
{
Clipboard.GetText(); <--Exception.
}
}
Since this class 'Engine' is not a Windows Form, I can't use
InvokeRequired. Non-Form class has no way to access the clipboard in
another thread? Or may I have to use WinAPI to directly access the
clipboard bypassing .NET BCL?
Thank you.
{
Thread Worker;
public event ... EngineMessage;
public void Start()
{
Worker=new Thread(new ThreadStart(Run));
Worker.Start();
}
private Run()
{
Clipboard.GetText(); <--Exception.
}
}
Since this class 'Engine' is not a Windows Form, I can't use
InvokeRequired. Non-Form class has no way to access the clipboard in
another thread? Or may I have to use WinAPI to directly access the
clipboard bypassing .NET BCL?
Thank you.