C#控制PPT在放映模式下的显示和隐藏
http://blog.csdn.net/luols/article/details/7898853
PPT在放映模式下貌似没有显示和隐藏功能,不知是我没找到还是确实没有,这不重要,即使真的没有,我们可以用下面的方法来实现该功能
- using PowerPoint=Microsoft.Office.Interop.PowerPoint;
- bool pptVisible = true;
- PowerPoint.Application PPApp;
- /// <summary>
- /// 显示/隐藏 PPT幻灯片
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnShowOrHidePPT_Click(object sender, EventArgs e)
- {
- if (pptVisible)
- {
- PPApp.ActivePresentation.SlideShowWindow.Top = 3000; //移到不可见的位置
- }
- else
- {
- PPApp.ActivePresentation.SlideShowWindow.Top = 0;
- PPApp.ActivePresentation.SlideShowWindow.Activate(); //需重新激活,否则会跑到下层
- }
- pptVisible = !pptVisible;
- }
posted on 2014-05-04 09:58 okgogo2000 阅读(366) 评论(0) 收藏 举报
浙公网安备 33010602011771号