Dim PathToSCR As String = "C:\Windows\System32\scrnsave.scr"
'start screensaver
Dim ScreenSaver As Process = Process.Start(PathToSCR)
'stop the screensaver
ScreenSaver.Kill()
OK, so suppose the screensaver was started by windows instead of my app. How would I stop it, since I don't have a process name to kill & don't know the actual screensaver name
Dim AllProcesses() As Process = Process.GetProcesses()
For Each p As Process In AllProcesses
If p.ProcessName.EndsWith("scr") Then
p.Kill()
End If
Next