zoukankan      html  css  js  c++  java
  • 如何直接将HTML代码加载到TWebBrowser

    wbRecvContent//为 webbrowser控件

    procedure TFrmMain.ShowHtmlCentent(slt: TStrings);

    var

      aMemory: TMemoryStream;

      pbuf: PAnsiChar;

    begin

      aMemory := TMemoryStream.Create();

      try

        aMemory.Clear;

        slt.SaveToStream(aMemory);

        aMemory.Seek(0, soBeginning);

        wbRecvContent.Navigate('about:blank');

        while wbRecvContent.ReadyState < READYSTATE_INTERACTIVE do

          Application.ProcessMessages;

        if Assigned(wbRecvContent.Document) then

          (wbRecvContent.Document as IPersistStreamInit).Load(TStreamAdapter.Create(aMemory));

      finally

        FreeAndNil(aMemory);

      end;

    end;

  • 相关阅读:
    定时器
    SysTick
    13.看门狗
    12.FSMC
    11.中断
    ##HTML行内块元素好迷啊!!
    ##HTML基础
    ##CS3动画效果
    ##管家婆项目(tools层)
    ##管家婆项目(app层)
  • 原文地址:https://www.cnblogs.com/linyawen/p/2178670.html
Copyright © 2011-2022 走看看