public static void Invoke(EventFunc dele) { ThreadEvent e = new ThreadEvent(dele); e.handle = GCHandle.Alloc(e); // we don't want the GC to collect the event too early PostEvent(qApp.receiver, e); }