screensaver problem RRS feed

  • Question

  • I have a screensaver solution in 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
          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
        End Try
      End Sub

      Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Shown
      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

          If _Process IsNot Nothing Then
            _Process = Nothing
          End If

        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
          End If
      End Sub

    End Class

    Monday, August 7, 2017 3:03 PM

All replies

  • Screensaver can run your PowerPoint slides, just save them as jpeg and run the screensaver from these.

    You can also dynamically change the screensaver parameters.

    Have a look at this to setup your screensaver from your PowerPoint slides:

    Monday, August 7, 2017 3:14 PM
  • True, but that is a workaround with jpeg files. I need to run this as a real powerpoint slideshow with the pptview process.
    Monday, August 7, 2017 3:16 PM
  • PowerPoint has a loop option.

    If you setup the presentation as a loop the ESC key ends it: you could capture the mouse move and send ESC to the process...

    Monday, August 7, 2017 3:25 PM
  • ESC and stopping the works fine when I use the Preview button on the screensaver settings form. That works. Problem occurs when the screensaver is started normally (not via preview), then the slideshow is ended (that works) but I remain with a black screen and have to click CTRL ALT DEL to terminate the screensaver. At that time, the powerpoint slideshow is not running anymore.
    Monday, August 7, 2017 4:06 PM
  • Anyone? Is there a way (win api call?) to terminate the screen saver? Conflict here is probably that a program (powerpoint) that turns off a screensaver is launched as screen saver. Interesting, not?
    Sunday, August 13, 2017 11:03 AM
  • Hi Kurt Dupont,

    I see that you have used kill method to terminate the screen saver, and I can use this method to cancel my screen saver successfully, so why you want to find Win api to terminate the screen saver?

    Best Regards,


    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

    Wednesday, August 16, 2017 9:19 AM
  • Thanks Cherry. 

    The program (my screen saver) is stopped indeed. That part works, but then I still have to press CTRL ALT DEL to get back to the desktop (although that option to press CTRL ALT DEL was not checked!).

    So I think that the screen saver is ended correctly but the powerpoint viewer is disabling the screen saver when a slideshow is running, right? I think that causes the problem I see.

    So the problem is that the screen is ended, but I still have to press CTRL ALT DEL and that I don't want. The screen saver is ended, but I still see a full black screen till I click CTRL ALT DEL.


    Wednesday, August 16, 2017 10:18 AM
  • Thank you for the reply.
    Wednesday, August 16, 2017 10:30 AM