S
scdoudou
Unregistered / Unconfirmed
GUEST, unregistred user!
主程序
procedure TGetWebDataMain.CheckBox9click(Sender: TObject);
begin
try
If CheckBox9.Checked = true then
begin
pagecontrol1.ActivePage := tabsheet9;
WebBrowser9.Navigate(sspurl);
timer9.enabled := true;
end
else
timer9.Enabled := false;
except
end;
end;
procedure TGetWebDataMain.timer9ontimer(Sender: TObject);
begin
WebBrowser9.Navigate(sspurl);
end;
procedure TGetWebDataMain.webcomplete9(Sender: TObject; const pDisp: IDispatch;
var URL: OleVariant);
begin
if pos('1Event',webbrowser9.LocationURL) > 0 then
myth.create(WebBrowser9,datasource9,connectstr,listbox9);
end;
网页内容处理线程
constructor myth.Create(wb:TwebBrowser;ds:Tdatasource;connectstr:string;lb:Tlistbox);
begin
inherited create(true);
FreeOnTerminate := True;
ADOQuery1 := TADOQuery.Create(nil);
ADOQuery2 := TADOQuery.Create(nil);
try
ADOQuery1.ConnectionString := connectstr;
ADOQuery2.ConnectionString := connectstr;
ds.DataSet :=ADOQuery1;
except
end;
if not wb.busy then
begin
try
doc:=IHTMLDocument2(wb.document);
htmstr:=doc.body.outerhtml;
lb1 := lb;
gettext();
except
end;
adoquery2.free;
end;
end;
procedure TGetWebDataMain.CheckBox9click(Sender: TObject);
begin
try
If CheckBox9.Checked = true then
begin
pagecontrol1.ActivePage := tabsheet9;
WebBrowser9.Navigate(sspurl);
timer9.enabled := true;
end
else
timer9.Enabled := false;
except
end;
end;
procedure TGetWebDataMain.timer9ontimer(Sender: TObject);
begin
WebBrowser9.Navigate(sspurl);
end;
procedure TGetWebDataMain.webcomplete9(Sender: TObject; const pDisp: IDispatch;
var URL: OleVariant);
begin
if pos('1Event',webbrowser9.LocationURL) > 0 then
myth.create(WebBrowser9,datasource9,connectstr,listbox9);
end;
网页内容处理线程
constructor myth.Create(wb:TwebBrowser;ds:Tdatasource;connectstr:string;lb:Tlistbox);
begin
inherited create(true);
FreeOnTerminate := True;
ADOQuery1 := TADOQuery.Create(nil);
ADOQuery2 := TADOQuery.Create(nil);
try
ADOQuery1.ConnectionString := connectstr;
ADOQuery2.ConnectionString := connectstr;
ds.DataSet :=ADOQuery1;
except
end;
if not wb.busy then
begin
try
doc:=IHTMLDocument2(wb.document);
htmstr:=doc.body.outerhtml;
lb1 := lb;
gettext();
except
end;
adoquery2.free;
end;
end;