Home > Back-end >  Take a walk, take a look at, this problem has plagued a few days...
Take a walk, take a look at, this problem has plagued a few days...

Time:09-24

I use WebBrowser when loading a web site, the site there are many Frame, and there are a lot of nested Frame in the Frame, how can traverse all the Frame in the site, have been found on the Internet, there is no good way to solve, please which eldest brother met, please advice, thank you very much,,,

CodePudding user response:

Specific url can be sent, I give it a try

CodePudding user response:

The to ksrsoft

The elder brothers, how much is your QQ? Can I sent to you on the QQ,

CodePudding user response:

@ ksrsoft
Because they need the user name, password,

CodePudding user response:

The Function TForm1. GetFrame (FrameNo: Integer) : the IWebbrowser2;
Var
OleContainer: IOleContainer;
Enum: IEnumUnknown;
Unk: IUnknown;
Fetched: PLongint;
The begin
While Form1. Webbrowser1. ReadyState<> READYSTATE_COMPLETE do
Application. ProcessMessages;
If Assigned (webbrowser1. Document) then
The begin
Fetched:=nil;
OleContainer:=webbrowser1. Document as IOleContainer;
OleContainer. EnumObjects (OLECONTF_EMBEDDINGS, enum);
Enum. Skip (FrameNo);
Enum. Next (OLECONTF_EMBEDDINGS, Unk, Fetched);
Result:=Unk as IWebbrowser2;
End
The else
Result:=nil;
end;
  • Related