È possibile incorporare un Visualizzatore di PowerPoint in un Windows Form C#?Incorpora PowerPoint Viewer in C# Win Form
Attualmente sto utilizzare il seguente codice:
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;
mostra lo spettatore sulla forma, ma il posizionamento e il dimensionamento è sbagliato. Come sarebbe una taglia e posizionarla correttamente.
Un'altra opzione:
ho incontrato l'applicazione Aximp.exe pensato per essere utilizzato per la visualizzazione dei controlli ActiveX su moduli vincere in C#. Come dovrei usare questo con il PPT Viewer?
guarda questa risposta. http://stackoverflow.com/a/10271255/1257567 esattamente quello che vuoi. – diogopalhais