是否可以将PowerPoint Viewer嵌入到C#Windows窗体中?
我目前使用以下代码:
objApp = new PowerPoint.Application();
//objApp.Visible = MsoTriState.msoTrue;
objPresSet = objApp.Presentations;
objPres = objPresSet.Open(ppsAction.FileInfo.FullName, MsoTriState.msoTrue, MsoTriState.msoTrue, MsoTriState.msoFalse);
objSlides = objPres.Slides;
//Run the Slide show
objSSS = objPres.SlideShowSettings;
objSSS.ShowType = Microsoft.Office.Interop.PowerPoint.PpSlideShowType.ppShowTypeSpeaker;
objSSS.LoopUntilStopped = MsoTriState.msoTrue;
objSSS.Run();
WindowWrapper handleWrapper = new WindowWrapper(objPres.SlideShowWindow.HWND);
SetParent(handleWrapper.Handle, this.ApplicationPanel.Handle);
this.ApplicationPanel.Visible = true;
objPres.SlideShowWindow.Height = ApplicationPanel.Height;
objPres.SlideShowWindow.Width = ApplicationPanel.Width;
objPres.SlideShowWindow.Top = 0;
objPres.SlideShowWindow.Left = 0;
Run Code Online (Sandbox Code Playgroud)
它在表单上显示查看器,但放置和大小调整是错误的.如何正确放置和放置它.
另一种选择:
我遇到过Aximp.exe应用程序,用于在C#中显示Win窗体上的ActiveX控件.我如何在PPT Viewer中使用它?
| 归档时间: |
|
| 查看次数: |
26998 次 |
| 最近记录: |