none
PowerPoint viewer and screen saver conflict? RRS feed

  • Question

  • I have a screensaver solution in vb.net that is starting a EXE. As a test, I call the calculator and that works fine. When I move the mouse, the screensaver and the calculator is ended by code. That is working fine.

    But when I launch a powerpoint slideshow via the pptview.exe (PowerPoint viewer), then I have a problem that the running slideshow is ended but it remains with a black screen. I really have to hit CTRL ALT DEL to end the slideshow.

    I know that the pptview is disabling the screensaver and preventing that the screensaver starts when a PowerPoint slideshow is running and I suspect that this extra 'feature' is part of my problem here now.

    Question: how can I end my screensaver without hitting CTRL ALT DEL?

    Public Class Form1

      Private WithEvents _Process As Process

      Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
        Try
          Dim arg As String = ""
          If My.Application.CommandLineArgs.Count > 0 Then
            arg = My.Application.CommandLineArgs(0).ToLower(System.Globalization.CultureInfo.InvariantCulture).Trim()
          End If
          If arg <> "/s" Then End
          _Process = Process.Start("c:\program files (x86)\microsoft office\office14\pptview.exe", " /s ""C:\tmpA8F6.pptx""")
          '_Process = Process.Start("c:\windows\system32\calc.exe")
        Catch ex As Exception
          MsgBox(ex.Message)
        End Try
      End Sub

      Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Shown
        Me.Timer1.Start()
      End Sub

      Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        Static mouseX As Integer = Me.Cursor.Current.Position.X
        Static mouseY As Integer = Me.Cursor.Current.Position.Y
        If Me.Cursor.Current.Position.X <> mouseX Or Me.Cursor.Current.Position.Y <> mouseY Then
          Me.Timer1.Stop()

          If _Process IsNot Nothing Then
            KillAllProcesses()
            '_Process.Kill()
            _Process = Nothing
          End If

          End
        End If

      End Sub

      Private Sub KillAllProcesses()
        On Error Resume Next
        For Each OneProcess As Process In Process.GetProcesses
          If OneProcess.ProcessName.ToUpper = "PPTVIEW" Then
            OneProcess.Kill()
          End If
        Next
      End Sub

    End Class
    Tuesday, September 5, 2017 8:20 AM

All replies

  • Hello,

    I test your code above and fail to reproduce your issue. The application would quit once I move the mouse. I suggest you create a new application to test the code above. The presentation seems to be a temp file, please create a new presentation to test if the issue still exists.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, September 6, 2017 6:34 AM
    Moderator
  • Thanks Celeste,

    Are you just running the project/code manually from VS? Then it works for me too. 

    It fails only when you really let this EXE/SCR run as screensaver. Even the preview works fine! But it stops working when you let it become active automatically by itself as a real screensaver. Then you get that delay/problem with the termination of the screensaver. Can you try that too?

    Monday, September 11, 2017 3:27 PM
  • Hello,

    Could you please share detail steps here how to let the project run as screensaver?

    I try to change the extension into SCR and add it into C:\Windows\System32, but I would get error "This application could not be started" when setting it as screensaver.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, September 12, 2017 5:53 AM
    Moderator
  • Thanks Celeste. I think you have to compile as 32 bits and place the screensaver at your SysWOW64 folder.
    Tuesday, September 12, 2017 7:56 AM
  • Hello,

    Thanks for the information. When I use the application as screensaver, testing on Win10, it would always be black. However, it works fine in Preview.

    I think we are unable to let the presentation as screensaver when it is in slide show mode. 

    When using built-in screensaver, it would not show when the presentation is in slide show mode. I get the same performance with PowerPoint Viewer and PowerPoint 2016.

    To work around, you may convert slides into pictures and put it in one folder and use it as screensaver.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, September 12, 2017 9:37 AM
    Moderator
  • Thanks Celeste, but when I run the code here, the powerpoint slideshow IS working. It is just that when I move the mouse, the slide show is ended. So that is working too. The problem is that I remain with a black screen that I have to end with CTRL ALT DEL (although that logging on again if not enabled), and that I need to avoid. Exporting to images is not an option as I lose all the animations etc. I need to run this as PowerPoint slideshow without conversion. That's the reason of assistance for this application.
    Tuesday, September 12, 2017 9:46 AM
  • Hello,

    I found the screensaver would have some issues when using Remote Desktop. The built-in screensaver would be black too. Then I test on local machine which is Windows Server 2012 R2, it works fine. It would exit once I move mouse.

    What is your OS? Could you reproduce the issue using different machines or different OS? Do you try to use PowerPoint application instead of PowerPoint Viewer?

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, September 13, 2017 8:37 AM
    Moderator
  • Hi Celeste,

    In my case it is Win10 and the PowerPoint Viewer. I believe to experience that the full PowerPoint does not have that problem.

    Wednesday, September 13, 2017 9:21 AM
  • Hello,

    Do you test any built-in screensaver? If the built-in screensaver would have the same issue, I suggest you post on Win10 forum for support.

    If the issue only occurs for the custom screensaver, I suggest you use full PowerPoint version to work around.

    Sorry that we do not have local machine with Win10 to test. When using remote desktop connection or visual machine connection to connect test environment, the screensaver would be always black and once I move mouse, it would successfully exit. Due to the limitation of community support channel, I will suggest you contact the Microsoft professional support so that our engineers can work closely with you to troubleshoot this issue.
    If the support engineer determines that the issue is the result of a bug the service request will be a no-charge case and you won't be charged. 

    Please visit the link below to see the various paid support options that are available to better meet your needs.  
    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone
    Thanks for your understanding.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, September 14, 2017 6:08 AM
    Moderator
  • OK thanks. Will try to contact them.
    Thursday, September 14, 2017 8:42 AM
  • You are welcome and we would appreciate if you could share the solution here if the issue is fixed.

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, September 14, 2017 9:03 AM
    Moderator