Refresh WEB frames fra Delphi
Jeg kan Refresh en side sådan, men hvordan Refresh jeg en Frame, og ikke hele siden:Import MS Internet Control.
Uses MSHTML_TLB, SHDocVw_TLB, SHDocVw;
var
ShellWindow: IShellWindows;
WB: IWebbrowser2;
spDisp: IDispatch;
IDoc1: IHTMLDocument2;
k: Integer;
begin
ShellWindow := CoShellWindows.Create;
for k := 0 to ShellWindow.Count do
begin
spDisp := ShellWindow.Item(k);
if spDisp = nil then Continue;
spDisp.QueryInterface(iWebBrowser2, WB);
if WB <> nil then
begin
WB := ShellWindow.Item(k) as IWebbrowser2;
if (Pos('myFrames.asp', WB.LocationURL) > 0) then
begin
WB.Refresh;
Exit;
end;
end;
end;
end;
