WebBrowser Control - Console Application - Events Not Firing

别等时光非礼了梦想. 提交于 2019-11-30 16:09:28

The basic requirement of an STA thread is that it needs to run a message pump. In Windows Forms, you can use Application.Run. Or you could write the message pump by hand, using user32!GetMessage & DispatchMessage. But it's probably easier to use the one in WinForms or WPF.

It will work as long as process events while it's running.

You can simply call "Application.DoEvents()" in a wait loop. You don't need to do anything fancier than that, and it works fine in my console application.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!