C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[40347] 델파이 코드인데 어떻게 수정해야 할지....
윤주일 [soarup] 1576 읽음    2005-05-30 15:44
iesniffer.zip 788.4KB IESniffer 컴포넌트
안녕하세요...

IESniffer 라는 인터넷익스플로러 콘트롤 컴포넌트를 테스트해보고 있는데요...
http://www.appcontrols.com/components.html

도움말 내용에 브라우저의 html 내용을 읽어오는 기능이 있는데 이게 델파이 코드라 난감하네요.. ^^;;
나름대로 수정을 해봤는데 동작이 안되요..

Example 1 (demonstrates how to read all content of downloaded HTML page)

uses MSHTML; // introduces IHTMLDocument2 interface
procedure TForm1.IESniffer1WBDownloadComplete(Sender: TObject;
  const URL: String; const Browser: IWebBrowser2);
var
  doc: IHTMLDocument2;
  Collection: IHTMLElementCollection;
  Element: IHTMLElement;
  HTMLPage: String;
  PlainText: String;
begin
  try
    doc := (Browser.Document as IHTMLDocument2);
    Collection := doc.all;
    Collection := Collection.Tags('BODY') as IHTMLElementCollection;
    Element := Collection.Item(NULL, 0) as IHTMLElement;
    HTMLPage := Element.OuterHTML; // read the HTML page
    PlainText := Element.OuterText; // or just plain text
  except
  end;
end;

고수님들의 도움 부탁드립니다...

+ -

관련 글 리스트
40347 델파이 코드인데 어떻게 수정해야 할지.... 윤주일 1576 2005/05/30
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.