以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  WebBrowser显示的问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=86379)

--  作者:douglas738888
--  发布时间:2016/6/16 12:38:00
--  WebBrowser显示的问题
我查看了电脑上的IE好像没有问题,在WebBrowser里面显示WORD,系统启动,第一次打开正常,后面再打开就是空白的

EXCEL在WebBrowser显示,没有工具栏显示

Dim wbr As WinForm.WebBrowser = e.Form.Controls("WebBrowser1")
Dim tmp As String = ProjectPath & "Attachments\\工程师日志.xls"
Dim rpt As String = ProjectPath & "Reports\\工程师日志.xls"
Dim Book As New XLS.Book(tmp)
Book.Build() 
Book.Save(rpt)
wbr.OfficeToolBar = True ,这里已经为True也不显示工具栏
wbr.AddRess = rpt

--  作者:大红袍
--  发布时间:2016/6/16 12:47:00
--  

Dim wbr As WinForm.WebBrowser = e.Form.Controls("WebBrowser1")

wbr.AddRess = Nothing

Dim ps As  System.Diagnostics.Process() = System.Diagnostics.Process.GetProcessesByName("excel")
For Each p As System.Diagnostics.Process In ps
    If p.MainWindowTitle = Nothing Then  p.kill
Next

 

Dim tmp As String = ProjectPath & "Attachments\\工程师日志.xls"
Dim rpt As String = ProjectPath & "Reports\\工程师日志.xls"
Dim Book As New XLS.Book(tmp)
Book.Build() 
Book.Save(rpt)
wbr.OfficeToolBar = True
wbr.AddRess = rpt
[此贴子已经被作者于2016/6/16 12:47:09编辑过]

--  作者:大红袍
--  发布时间:2016/6/16 12:47:00
--  

参考

 

http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=85829&skin=0