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

上一段子代码。

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. BZOJ囤题计划

    决定做一些题,学习jry,开坑(其实是填坑) 大概会刷的很慢,大家别鄙视我..欢迎鄙视 果然慢出翔了,还是填完吧.. 现在做了: 11 [2338][HNOI2011]数矩形 枚举对角线暴力水过,所有 ...

  2. 【知了堂学习笔记】java 正则表达式

    本文参考网络上面别人的博客知识产出 正则表达式基础 1.句号 假设你想要找出三个字母的单词,而且这些单词必须以“t”字母开头,以“n”字母结束.另外,假设有一本英文字典,你可以用正则表达式搜索它的全部 ...

  3. PHP中双引号引起的命令执行漏洞

    前言 在PHP语言中,单引号和双引号都可以表示一个字符串,但是对于双引号来说,可能会对引号内的内容进行二次解释,这就可能会出现安全问题. 正文 举个简单例子 <?php $a = 1; $b = ...

  4. [Agc011F] Train Service Planning

    [Agc011F] Train Service Planning 题目大意: 有n+1个车站,n条轨道,第i条轨道联通i-1和i车站,通过它要花a[i]时间,这条轨道有b[i]=1或2条车道,也就是说 ...

  5. 【SPFA判断负环】BZOJ1715- [Usaco2006 Dec]Wormholes 虫洞

    [题目大意] 判断一张图中是否存在负环. [思路] dfs版SPFA. #include<bits/stdc++.h> using namespace std; struct edge { ...

  6. 转 MySQL连接超时

    在负载较重的MySQL服务器上,有时你偶尔会看到一些连接超时的错误,诸如: Can’t connect to MySQL server on ‘mydb’(110).如果当时你有多个连接请求,你会发现 ...

  7. 502 解决:[WARNING] fpm_children_bury

    查过网上的资源,基本都是认为是php线程打开文件句柄受限导致的错误.具体的解决的办法如下:   1.提升服务器的文件句柄打开打开 /etc/security/limits.conf : (增加) * ...

  8. iptables配置允许mysql远程访问

    vi /etc/sysconfig/iptables iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCE ...

  9. 火狐FoxyProxy配置教程

    原文:http://www.lvtao.net/tool/640.html 虽然autoproxy是火狐上最优秀的代理插件,但是好久不更新,也有一些bug,比如观看youtube视频7分钟左右会无法播 ...

  10. IEEE Bigger系列题解

    Bigger系列题解 Bigger Python 坑点在于要高精度以及表达式求值,用java写可以很容易避免高精度问题 然后这道题就可以AC了 代码 import java.io.*; import ...