I am currenctly using the code bellow, to show a PPT document:
private void WebBrowser_LoadCompleted(object pSender, NavigationEventArgs pArgs)
{
try
{
WebBrowser objsender = (WebBrowser)pSender;
if (objsender.Document is Micr开发者_如何学Cosoft.Office.Interop.PowerPoint.Presentation)
{
Microsoft.Office.Interop.PowerPoint.Presentation objPowerPoint = (Microsoft.Office.Interop.PowerPoint.Presentation)objsender.Document;
objPowerPoint.SlideShowSettings.ShowScrollbar = Microsoft.Office.Core.MsoTriState.msoFalse;
objPowerPoint.SlideShowSettings.Run();
Microsoft.Office.Core.MsoTriState objMsoTriState = objPowerPoint.SlideShowWindow.IsFullScreen;
//objMsoTriState = Microsoft.Office.Core.MsoTriState.msoFalse
}
objsender.Visibility = Visibility.Visible;
}
catch { }
}
The problem is the powerpoint is showing a vertical scrollbar, which is used to navidate through the slides. I need to hide this scrollbar, but I can't find a way to archieve this.
If anyone has a clue on how to archieve this, I would very much appretiate.
Thanks,
Marco
as objsender is a WebBrowser object, you may want to try
objsender.Document.Body.Scroll = "No"
Hope this helps
Greez MikeD
It probably is the browser scrollbar, but you might also want to ensure that the presentation displays in the mode you expect by setting the ShowType, which can take on three values:
ppShowTypeSpeaker ppShowTypeKiosk ppShowTypeWindow
Only the window type will display a scrollbar or any other "furniture". The other types go full screen, but it would probably be best to specify which you want rather than depending on it being set that way already.
For playing on the fullscreen mode just:
App.ActivePresentation.SlideShowSettings.Run();
精彩评论