est-il possible d'intégrer un visualiseur PowerPoint dans un formulaire Windows C #?
Je suis actuellement Utilisez le code suivant: P>
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;
3 Réponses :
Voir ce < / a> lien. Vous pouvez également afficher le PPT dans un contrôle WebBrowser. Ce pourrait également être utile. P>
Je suis allé avec l'option de contrôle du navigateur Web. Bien que je devais modifier certains paramètres pour PowerPoint 2007 Docs.
Merci pour de bonnes liens, http://support.microsoft.com/kb/304662 a des informations utiles ... cela m'a aidé :) p>
pour la mise en place changeez le objpres.slideshowwindow.top code> à 10 sous forme d'exemple et objpres.slideshowwindow.left code> à 12 afin que le coin supérieur gauche de la diapositive soit ( 12,10) Où le déplacez-le horizontal et le haut le déplace verticalement. P>
Regardez cette réponse. http://stackoverflow.com/a/10271255/1257567Stackoverflow.com/a/10271255 / 1257567 "> http: // ... > exactement ce que vous voulez.