是否有可能在一个线程中使用web浏览器? (德尔福)
问题描述:
我使用WebBrowser控件来填充网页。是有可能使用WB一个线程内?
I'm using WebBrowser control to fill a web page . is it possible to using WB inside a thread ?
感谢您
答
TWebBrowser
是一个VCL控制。因此,它必须被创建并在主VCL线程操作
TWebBrowser
is a VCL control. Therefore, it must be created and operated in the main VCL thread.
控制已异步行为,虽然。当你告诉它导航到一个页面,它会做,在后台,并通知您(通过 OnNavigateComplete
等事件)时,它的完成了。
The control already acts asynchronously, though. When you tell it to navigate to a page, it will do that in the background and notify you (via OnNavigateComplete
and other events) when it's finished.