• WebBrowser的简单使用


    加载初始网页

    this.webBrowser1.Url = new Uri("http://www.google.com");

    加载初始html

    webBrowser1.DocumentText =
        "<html><body>Please enter your name:<br/>" +
        "<input type='text' name='userName'/><br/>" +
        "<a href='http://www.microsoft.com'>continue</a>" +
        "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>" +
        "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>" +
        "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>"+                
        "</body></html>";

    webBrowser1.Navigate(@"D:A	est.html");

    加载pdf文件

    this.webBrowser1.Url = new Uri(@"D:pdfa.pdf");

    在html中嵌入pdf

    webBrowser1.DocumentText = "<html><body><p><center><h1> PDF in HTML </h1></center></p>" +
        "<object classid = 'clsid:CA8A9780-280D-11CF-A24D-444553540000' width = '100%' height = '720'>" +
        @"<param name = 'SRC' value = 'D:pdfa.pdf'>" +
        @"<embed width = '100%' height = '400' fullscreen = 'yes' src = 'D:pdfa.pdf'>" +
        "<noembed></noembed></embed></object></body></html>";
  • 相关阅读:
    深入理解DB2缓冲池(BufferPool)
    收银台采坑总结
    webpack4的总结
    无心法师-讲解
    cache 缓存的处理
    用es6方式的写的订阅发布的模式
    Skeleton Screen -- 骨架屏--应用
    promise实现原理
    业务线移动端适配方案总结
    vdom,diff,key 算法的了解
  • 原文地址:https://www.cnblogs.com/jizhiqiliao/p/9995772.html
Copyright © 2020-2023  润新知