Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.11.28;
Скачать: CL | DM;

Вниз

IHTMLWindow.document   Найти похожие ветки 

 
RuberoiD ©   (2002-10-03 13:05) [0]

Такая проблема:

procedure TForm1.Button1Click(Sender: TObject);
var
i : integer;
s : string;
ov : OleVariant;
iDoc : IHTMLDocument2;
iDisp : IDispatch;
iFrames2 : IHTMLFramesCollection2;
iWindow2 : IHTMLWindow2;
iFrameDoc : IHTMLDocument2;
begin
iDoc:=Form1.Browser1.ControlInterface.Document as IHTMLDocument2;
iFrames2:=iDoc.frames as IHTMLFramesCollection2;
for i:=1 to iFrames2.length do
begin
ov:=i-1;
iDisp:=iFrames2.item(ov);
iDisp.QueryInterface(IHTMLWindow2,iWindow2);
iWindow2.document.QueryInterface(IHTMLDocument2,iFrameDoc);
{ВЫДАЕТ ОШИБКУ "НЕТ ДОСТУПА"}
s:=iFrameDoc.title;
end;
end;

заранее благодарен


 
int64 ©   (2002-10-04 00:43) [1]

Просто альтернативный вариант.

procedure TForm1.Button1Click(Sender: TObject);
var
i : integer;
s : string;
iDoc : IHTMLDocument2;
iFrames2 : IHTMLElementCollection;
IFrame: HTMLFrameElement;
iFrameDoc : IHTMLDocument2;
begin
iDoc:=Form1.Browser1.Document as IHTMLDocument2;
iFrames2:=IHTMLElementCollection(HTMLDocument(iDoc).All.Tags("FRAME"));
for i:=0 to iFrames2.length-1 do
begin
IFrame:= iFrames2.item(i,varEmpty) as HTMLFrameElement;
iFrameDoc:=IFrame.document as IHTMLDocument2;
{далее работаем с документом
каждого фрейма}
end;
end;


 
RuberoiD ©   (2002-10-04 08:46) [2]

Спасобо!



Страницы: 1 вся ветка

Текущий архив: 2002.11.28;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.021 c
14-93191
Coder 911
2002-11-08 19:18
2002.11.28
Создание тренера.


8-93148
Cr@sh
2002-08-07 12:37
2002.11.28
Как заштриховать произвольную область в TImage?


4-93309
Игорь Шевченко
2002-10-16 09:50
2002.11.28
Ищу информацию по недокументируемой функции GDI32.PolyPatBlt


3-92908
alxx
2002-11-10 18:24
2002.11.28
Windows NT-authentification в MSSQLServer


3-92854
Gregory
2002-11-09 09:39
2002.11.28
Удаление записей из Paradox