PowerPoint 设置全屏

发布于 2024-11-17 16:39:20 字数 939 浏览 3 评论 0原文

我当前正在使用下面的代码来显示 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

攒一口袋星星 2024-11-24 16:39:20

由于 objsender 是一个 WebBrowser 对象,您可能想尝试

objsender.Document.Body.Scroll = "No"

希望这有帮助

Greez MikeD

as objsender is a WebBrowser object, you may want to try

objsender.Document.Body.Scroll = "No"

Hope this helps

Greez MikeD

心作怪 2024-11-24 16:39:20

它可能是浏览器滚动条,但您可能还想通过设置 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.

影子是时光的心 2024-11-24 16:39:20

仅在全屏模式下播放:

App.ActivePresentation.SlideShowSettings.Run();

For playing on the fullscreen mode just:

App.ActivePresentation.SlideShowSettings.Run();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文