PowerPoint 设置全屏
我当前正在使用下面的代码来显示 PPT 文档:
private void WebBrowser_LoadCompleted(object pSender, NavigationEventArgs pArgs)
{
try
{
WebBrowser objsender = (WebBrowser)pSender;
if (objsender.Document is Microsoft.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 { }
}
问题是 powerpoint 显示了一个垂直滚动条,用于在幻灯片中导航。我需要隐藏这个滚动条,但我找不到办法来实现这一点。
如果有人知道如何实现这一目标,我将非常感激。
谢谢,
马可
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 Microsoft.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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
由于 objsender 是一个 WebBrowser 对象,您可能想尝试
希望这有帮助
Greez MikeD
as objsender is a WebBrowser object, you may want to try
Hope this helps
Greez MikeD
它可能是浏览器滚动条,但您可能还想通过设置 ShowType(可以采用三个值)来确保演示文稿以您期望的模式显示:
ppShowTypeSpeaker
ppShowTypeKiosk
ppShowTypeWindow
只有窗口类型才会显示滚动条或任何其他“家具”。其他类型会全屏显示,但最好指定您想要的类型,而不是依赖于已经这样设置。
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: