Est-il possible d'incorporer une visionneuse PowerPoint dans un formulaire Windows C#?Intégrer PowerPoint Viewer dans C# Win Form
Je suis actuellement utiliser le code suivant:
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;
Il montre le spectateur sur la forme, mais la mise en place et le dimensionnement est faux. Comment pourrait-on le dimensionner et le placer correctement?
Une autre option:
J'ai rencontré l'application Aximp.exe destiné à être utilisé pour montrer les contrôles ActiveX sur les Win Forms en C#. Comment l'utiliser avec PPT Viewer?
regardez cette réponse. http://stackoverflow.com/a/10271255/1257567 exactement ce que vous voulez. – diogopalhais