C#WinForm嵌入PowerPointViewerC#WindowsForm可以嵌入PowerPointViewer吗?我目前正在使用以下代码:objApp=newPowerPoint.Application();//objApp.Visible=MsoTriState.msoTrue;objPresSet=objApp.Presentations;objPres=objPresSet.Open(ppsAction.FileInfo.FullName,MsoTriState.msoTrue,MsoTriState.msoTrue,MsoTriState.msoFalse);objSlides=objPres.Slides;//运行幻灯片objSSS=objPres.SlideShowSettings;objSSS.ShowType=Microsoft.Office.Interop.PowerPoint.PpSlideShowType.ppShowTypeSpeaker;跑步();WindowWrapperhandleWrapper=newWindowWrapper(objPres.SlideShowWindow.HWND);SetParent(handleWrapper.Handle,this.ApplicationPanel.Handle);this.ApplicationPanel.Visible=true;objPres.SlideShowWindow.Height=ApplicationobjPres.Height;SlideShowWindow.Width=ApplicationPanel.Width;objPres.SlideShowWindow.Top=0;objPres.SlideShowWindow.Left=0;它在表中查看器显示在工作表上,但放置和调整大小错误如何正确放置和定位它。另一种选择:我遇到了用于在C#中的WinForms上显示ActiveX控件的Aximp.exe应用程序。如何在PPTViewer中使用它?请参阅此链接。您也可以在WebBrowser控件中显示ppt。这也可能有用。感谢伟大的链接,http://support.microsoft.com/kb/304662有用的信息...这对我有帮助:)对于放置,将objPres.SlideShowWindow.Top更改为10,将objPres.SlideShowWindow.Left更改为12,以便幻灯片的左上角位于(12,10),左侧水平移动,顶部垂直向下移动。以上就是C#学习教程:使用C#WinForm嵌入PowerPointViewer中分享的所有内容。如果对你有用,需要进一步了解C#学习教程,希望大家多多关注。本文收集自网络,不代表立场。涉及侵权,请点击维权联系管理员删除。如需转载请注明出处:
