对,没错,如果你按关键字找到这篇随笔了,相信一定知道背景,以及我所说的是什么。

上一段子代码。

private void timerHideButton_Tick(object sender, EventArgs e)
{
try
{
HtmlDocument htmlDoc = webBrowser.Document;
if (webBrowser.Document != null)
htmlDoc = webBrowser.Document.Window.Frames["wacframe"].Document;
if (htmlDoc == null)
return; var toolBar = htmlDoc.GetElementById("PptUpperToolbar.LeftButtonDock");    //PPT、PPTX
if (toolBar == null)      
toolBar = htmlDoc.GetElementById("stripLeft");                 //DOC、DOCX、PDF
if (toolBar == null)
toolBar = htmlDoc.GetElementById("m_excelWebRenderer_ewaCtl_stripLeft"); //XLS、XLSX if (toolBar != null)
{
toolBar.InnerHtml = "";
timerHideButton.Enabled = false;
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}

  张三问了:还用个Timer,不科学,你应该把代码放到
                         webBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e);

回答:原先我也是这么想的,但是、可是因为 iframe 的原因,Completed事件可能会被激活多次,并且直到最后一次也不能准确得到预期结果。

(原)用WebBrowser浏览Office Web Apps Server,除去“下载”按钮的更多相关文章

  1. Office Web Apps Server

    Office Web Apps Server Office Web Apps Server 是一款 Office 服务器产品,可提供针对 Office 文件的基于浏览器的文件查看和编辑服务.Offic ...

  2. Office Web Apps Server 2013与PDF(一)

    好吧--这个消息有点旧,迟了将近4个月. Office Web Apps是微软各大服务产品系列中的一个基础服务,可以为SharePoint 2013.Exchange 2013.Lync 2013提供 ...

  3. sharepoint 2013 和 office web apps server 2013集成

    环境: 三台服务器  系统:window 2008 R2server01: 192.168.10.162(office web app)server02: 192.168.10.163(AD)serv ...

  4. Office Web Apps Server 概述

    Office Web Apps Server 是新的 Office 服务器产品,它提供 Word.PowerPoint.Excel 和 OneNote 的基于浏览器的版本.单个 Office Web ...

  5. [转载]部署Office Web Apps Server并配置其与SharePoint 2013的集成

    Office Web Apps Server 是新的 Office 服务器产品,它提供 Word.PowerPoint.Excel 和 OneNote 的基于浏览器的版本.单个 Office Web ...

  6. 部署Office Web Apps Server并配置其与SharePoint 2013的集成

    部署Office Web Apps Server并配置其与SharePoint 2013的集成   Office Web Apps Server 是新的 Office 服务器产品,它提供 Word.P ...

  7. office web apps server 问题和解决办法

    New-OfficeWebAppsFarm –InternalURL "http://owa.zjkhlib.com" –AllowHttp –EditingEnabled 错误1 ...

  8. office web apps server安装部署

    操作系统:windows 2012 软件下载地址: 链接:https://pan.baidu.com/s/1c3WWFs8 密码:4dcy NDP452-KB2901954-Web.exe(.Net ...

  9. BEGINNING SHAREPOINT® 2013 DEVELOPMENT 第14章节--使用Office Services开发应用程序 WOPI和新的Office Web Apps Server

    BEGINNING SHAREPOINT® 2013 DEVELOPMENT 第14章节--使用Office Services开发应用程序  WOPI和新的Office Web Apps Server ...

随机推荐

  1. Azkaban(三)Azkaban的使用

    界面介绍 首页有四个菜单 projects:最重要的部分,创建一个工程,所有flows将在工程中运行. scheduling:显示定时任务 executing:显示当前运行的任务 history:显示 ...

  2. CF474D. Flowers

    D. Flowers time limit per test 1.5 seconds memory limit per test 256 megabytes input standard input ...

  3. 【LOJ】#2275. 「JXOI2017」颜色

    题解 我们枚举右端点判断合法的左端点有哪些 首先,记录一下右端点右边的点的pre,也就是这个数字前一个出现的位置,取所有小于枚举右端点r的值中最大的一个做为l,用优先队列维护即可,[l + 1,r]就 ...

  4. linux服务开机启动

    1.chkconfig 配置开机启动 在  /etc/init.d  创建执行服务的可执行脚本,赋予脚本可执行权限.如果是通过yum 或者rpm安装的,并且已经在该目录下存在对应的启动脚本,就不用自己 ...

  5. 8-1 Stacks of Flapjacks UVA120

    题意:  有一叠煎饼在锅里 n n<=30张  每张都有一个数字 代表它的大小    厨师每次可以选择一个数k  把从锅底开始数第k张上面的煎饼全部反过来  即原来的在上面的煎饼现在到了下面   ...

  6. Ionic Js六:切换开关操作

    以下实例中,通过切换不同开关 checked 显示不同的值,true 为打开,false 为关闭. HTML 代码 <ion-header-bar class="bar-positiv ...

  7. CI框架的事务开启、提交和回滚

    1.运行事务 $this->db->trans_start(); // 开启事务$this->db->query('一条SQL查询...');$this->db-> ...

  8. CodeForces528A (STLset)

    题面 CodeForces 题解 横着切和竖着切是互相不影响的. 假设现在横着切成了很多段,显然此时面积最大的矩形的一边长就是这些段中长度最长的一段.竖着切的也是一样的. 所以就可以用\(set\)来 ...

  9. 装部署VMware vSphere 5.5文档 (6-2) 为IBM x3850 X5服务器安装配置VMware ESXi

    部署VMware vSphere 5.5 实施文档 ########################################################################## ...

  10. Django-url路由映射与views逻辑处理

    一.URL路由映射 路由映射模块,主要完成url与views视图函数的映射.当一个url请求到来时,会按照这个模块中的url地址从上到下进行匹配,如果匹配成功,将执行映射试图中的函数:反之将返回404 ...