S
shang_yan
Unregistered / Unconfirmed
GUEST, unregistred user!
动态创建TWebBrowser控件,该控件不是在窗口对象中动态创建的,
结果发现该控件不响应事件,详见下面的代码及说明,研究了好久,看了好多帖子都解决不了,我错在哪里了?
unit Parser;//非窗口
interface
uses Windows, Classes, ExtCtrls, StdCtrls, Mshtml......
...
type
THttpScan = class(TComponent)
private
wb:TWebBrowser
...
constructor THttpScan.Create(AOwner: TComponent);
begin
wb := TWebBrowser.Create(nil);
wb.OnDocumentComplete := WBDocumentComplete;
...
end;
结果发现该控件不响应事件,详见下面的代码及说明,研究了好久,看了好多帖子都解决不了,我错在哪里了?
unit Parser;//非窗口
interface
uses Windows, Classes, ExtCtrls, StdCtrls, Mshtml......
...
type
THttpScan = class(TComponent)
private
wb:TWebBrowser
...
constructor THttpScan.Create(AOwner: TComponent);
begin
wb := TWebBrowser.Create(nil);
wb.OnDocumentComplete := WBDocumentComplete;
...
end;