Message Queue

Jun 8 2009 7:57 AM
Hi everybody,

I'm new to the forum. I have problem regarding the windows message queue.  I have an application navigating to websites, and as I navigate to the sites there are some websites wich are not loading or I don`t know, and dokument completed event gets blocked. I'm using geckofx for browsing, I call the Navigate method in a loop and after it I call ProcessWinMessageQueue so that the browser can navigate;

 void ProcessWinMessageQueue()
        {
            NativeMethods.Message msg;

            while (NativeMethods.PeekMessage(out msg, IntPtr.Zero, 0, 0, 1))
            {
                NativeMethods.TranslateMessage(ref msg);
                NativeMethods.DispatchMessage(ref msg);
            }
        }

I'm calling this method in loop, maybe it stops for that reason, it stops at the DispatchMessage method by the WndProc method.
I would like to intrerupt the process in someway, is this possible ?