如题!多谢!!

解决方案 »

  1.   

    如果在表单中定义的字体字号属性,可通过分析网页源代码获得.
    而现在一般都使用CSS定义,想获取到就麻烦了.
      

  2.   

    Function GetWebPage(const Url: string):string;                                  {获取网页源代码}
    var
      Session,
      HttpFile:HINTERNET;
      szSizeBuffer:Pointer;
      dwLengthSizeBuffer:DWord;
      dwReserved:DWord;
      dwFileSize:DWord;
      dwBytesRead:DWord;
      Contents:PChar;
    begin
      Session:=InternetOpen('',0,niL,niL,0);
      HttpFile:=InternetOpenUrl(Session,PChar(Url),niL,0,0,0);
      dwLengthSizeBuffer:=1024;
      HttpQueryInfo(HttpFile,5,szSizeBuffer,dwLengthSizeBuffer,dwReserved);
      GetMem(Contents,dwFileSize);
      InternetReadFile(HttpFile,Contents,dwFileSize,dwBytesRead);
      InternetCloseHandle(HttpFile);
      InternetCloseHandle(Session);
      Result:=StrPas(Contents);
      FreeMem(Contents);
    end;
    获取代码后不就看到了
    Memo1.Text := GetWebPage('http://www.baidu.com/index.asp');