[Mono-list] Control.Invoke workaround

sviborg muutant at gmail.com
Wed May 9 08:26:54 UTC 2012


I have a legacy dll without source that uses Control.Invoke for event
callbacks into main thread. The problem is that Control class depends on X11
server in linux and can't be directly used on server machines without

void SomeFunc(object arg, AsyncCallbackDelegate callback,
System.Windows.Forms.Control win);

Control win = new Control();
dll.SomeFunc(arg, new AsyncCallbackDelegate(this.Callback), win);
WaitForCompletion(); // Application.DoEvents inside

So I'm looking for some workaround on this problem.
Any ideas?

View this message in context: http://mono.1490590.n4.nabble.com/Control-Invoke-workaround-tp4619717.html
Sent from the Mono - General mailing list archive at Nabble.com.

More information about the Mono-list mailing list