public static extern IntPtr SetWindowsHookEx(WindowsHookId windowsHookId, ProcessMessagesDelegate function, IntPtr mod, Int32 threadId);
private void Init(Game game, Rectangle area) { this.area = area; // 2013-08-16 (zunath): Added check to make sure we don't reinitialize the WebCore if (!WebCore.IsRunning) { WebCore.Initialize(new WebConfig()); } WebView = WebCore.CreateWebView(area.Width, area.Height); while (WebView.IsLoading) { WebCore.Update(); } WebView.IsTransparent = true; // WebView doesn't seem to listen when I say this //WebView.SelfUpdate = true; // So I have to say this: WebCore.AutoUpdatePeriod = 10000000; // TEEENN MIILLLIOON processMessages = ProcessMessages; // Create the message hook. hookHandle = User32.SetWindowsHookEx(3, processMessages, IntPtr.Zero, Kernel32.GetCurrentThreadId()); WebView.FocusView(); }