首页 新闻 赞助 找找看

winform 使用 axaxWebBrowser打开ppt的问题。

0
悬赏园豆:5 [已关闭问题] 关闭于 2013-12-06 11:07

当第一次打开时,完全没有问题,我再次点击浏览打开时,就在ppt的第二页卡住了。然后我点击下拉,可以继续进行ppt浏览。。望大神来解答下啊。。。。木有分了。。。

 

View Code
 1  private void btnOpenFile_Click(object sender, EventArgs e)
 2         {
 3             //选择文件
 4             if (openFileDlg.ShowDialog() == DialogResult.OK)
 5             {
 6                 //先卸载当前的文档
 7                 SetObjectNull();
 8                 tbxOpenFile.Text = openFileDlg.FileName;
 9                 object fileName = tbxOpenFile.Text;
10                 oDocument = null;
11                 //加载文档
12                 axWebBrowser1.Navigate2(ref fileName, ref refmissing, ref refmissing, ref refmissing, ref refmissing);
13             }
14         }
15 
16         /// <summary>
17         /// 加载完成时触发事件
18         /// </summary>
19         /// <param name="sender"></param>
20         /// <param name="e"></param>
21         public void axWebBrowser1_NavigateComplete2(object sender, AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event e)
22         {
23             Object o = e.pDisp;
24             oDocument = o.GetType().InvokeMember("Document", BindingFlags.GetProperty, null, o, null);
25             oApplication = o.GetType().InvokeMember("Application", BindingFlags.GetProperty, null, oDocument, null);
26             oName = o.GetType().InvokeMember("Name", BindingFlags.GetProperty, null, oApplication, null);
27         }
流浪命的主页 流浪命 | 初学一级 | 园豆:28
提问于:2012-12-17 15:47
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册