I've written a program for a client to run as a screensaver on their public
kiosk PCs. When it runs, it kills all open Internet Explorer windows and
makes a specified JPG image dance around the screen. When it exits, it
opens a new IE window to a website specified in the .config file.
The program works just fine when you run it on its own as an EXE. But when
you run it as a screensaver, it does not kill the IE windows and it doesn't
load the JPG image that is supposed to dance around, though it does launch
the new IE window. For testing purposes, I then wrote a second program that
simply calls the first one. If you call the first program (the screensaver)
from the second one, you get the same errors: IE windows don't get killed
and the image doesn't load. But just double-click the exact same
screensaver executable on your own and it runs fine.
The OS is letting the program kill IE windows etc. if the program is
explicitly started by the user. But if called by the part of Windows that
launches the screensaver, or if called by another program, it's like the OS
is not allowing the screensaver app to do its thing. I'm guessing there is
something simple at work here that I just don't know, being a relative
newcomer to C#. How can I get this app to kill running IE processes, etc.
anytime it is run? Any ideas?
Thank you in advance to anyone who can help.
Mike.