我希望能够通过按 Windows 窗体中的按钮来推进 Powerpoint 演示文稿。这是我找到的一些代码http://bytes.com/topic/c-sharp/answers/272940-open-powerpoint-presentation-c-window-form打开 Powerpoint 演示文稿幻灯片:
Microsoft.Office.Interop.PowerPoint.Application oPPT;
Microsoft.Office.Interop.PowerPoint.Presentations objPresSet;
Microsoft.Office.Interop.PowerPoint.Presentation objPres;
//the location of your powerpoint presentation
string strPres = @"filepath";
//Create an instance of PowerPoint.
oPPT = new Microsoft.Office.Interop.PowerPoint.ApplicationClass();
// Show PowerPoint to the user.
oPPT.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
objPresSet = oPPT.Presentations;
//open the presentation
objPres = objPresSet.Open(strPres, MsoTriState.msoFalse,
MsoTriState.msoTrue, MsoTriState.msoTrue);
objPres.SlideShowSettings.Run();
然而,我还没有找到任何可以通过幻灯片推进的方法。有任何想法吗?
(实际上,我想做的是使用 Wii 遥控器来推进幻灯片,用于学生项目)。
以编程方式前进的方法是“SlideShowWindow.View.Next”。您还可以使用“SlideShow Window.View.Previous”向后退。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)