By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,101 Members | 1,463 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,101 IT Pros & Developers. It's quick & easy.

c# Screensaver

P: n/a
I have been trying to build a screensaver that will connect to a database
and display specific data depending on the user that is logged in. I have
managed to get a simple data access screensaver to work, however, i can't
get the application to work with some prebuilt assemblies i have. Also,
when the screensaver is running under the windows screensaver settings it
also will not access the config file.

Any pointers would be greatly accepted

Simon
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Simon,

A screensaver is nothing more than an executable with an scr extension.
You shouldn't have any problems accessing the things you want to access.

What are the errors that you are getting, or is it just not working?

If you want, compare your code to the sample screensaver on
gotdotnet.com, located at (watch for line wrap):

http://www.gotdotnet.com/community/u...2-c07e5d3f68ed

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Simon Mercer" <si**********@kynetix.com> wrote in message
news:eK*************@TK2MSFTNGP09.phx.gbl...
I have been trying to build a screensaver that will connect to a database
and display specific data depending on the user that is logged in. I have
managed to get a simple data access screensaver to work, however, i can't
get the application to work with some prebuilt assemblies i have. Also,
when the screensaver is running under the windows screensaver settings it
also will not access the config file.

Any pointers would be greatly accepted

Simon

Nov 16 '05 #2

P: n/a
Well when the application is run under vs.net it works correctly as in you
can obtain keys from the ConfiurationSettings.AppSettings. When you rename
it to .scr (as well as renaming appname.scr.config) the application will not
retrieve settings from the file.

The example screensaver at the link doesn't use config files and also
compiles into a single executable, where as i have dll's i am trying to link
to.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:Oo**************@TK2MSFTNGP15.phx.gbl...
Simon,

A screensaver is nothing more than an executable with an scr extension. You shouldn't have any problems accessing the things you want to access.

What are the errors that you are getting, or is it just not working?

If you want, compare your code to the sample screensaver on
gotdotnet.com, located at (watch for line wrap):

http://www.gotdotnet.com/community/u...2-c07e5d3f68ed
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Simon Mercer" <si**********@kynetix.com> wrote in message
news:eK*************@TK2MSFTNGP09.phx.gbl...
I have been trying to build a screensaver that will connect to a database
and display specific data depending on the user that is logged in. I have managed to get a simple data access screensaver to work, however, i can't get the application to work with some prebuilt assemblies i have. Also,
when the screensaver is running under the windows screensaver settings it also will not access the config file.

Any pointers would be greatly accepted

Simon


Nov 16 '05 #3

P: n/a
I haven't worked with screen saver in .NET yet, but you might want to make
sure that your config file is in the directory where Windows executes the
screen saver from, it could be that the executing path for your app is the
windows or system32 directory. Check the value of
Environment.CurrentDirectory when it's executing under windows screen saver
settings.

Just a thought...

"Simon Mercer" <si**********@kynetix.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Well when the application is run under vs.net it works correctly as in you
can obtain keys from the ConfiurationSettings.AppSettings. When you
rename
it to .scr (as well as renaming appname.scr.config) the application will
not
retrieve settings from the file.

The example screensaver at the link doesn't use config files and also
compiles into a single executable, where as i have dll's i am trying to
link
to.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in
message news:Oo**************@TK2MSFTNGP15.phx.gbl...
Simon,

A screensaver is nothing more than an executable with an scr

extension.
You shouldn't have any problems accessing the things you want to access.

What are the errors that you are getting, or is it just not working?

If you want, compare your code to the sample screensaver on
gotdotnet.com, located at (watch for line wrap):

http://www.gotdotnet.com/community/u...2-c07e5d3f68ed

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Simon Mercer" <si**********@kynetix.com> wrote in message
news:eK*************@TK2MSFTNGP09.phx.gbl...
>I have been trying to build a screensaver that will connect to a
>database
> and display specific data depending on the user that is logged in. I have > managed to get a simple data access screensaver to work, however, i can't > get the application to work with some prebuilt assemblies i have.
> Also,
> when the screensaver is running under the windows screensaver settings it > also will not access the config file.
>
> Any pointers would be greatly accepted
>
> Simon
>
>



Nov 16 '05 #4

P: n/a
The security context in which the screensaver runs is not the interactive
users context.
Screensaver's have their own secured desktop and they run in the security
context of SYSTEM (XP) or LOCAL SERVICE (W2K3) local accounts, that means
you have to hardcode all file path's in code and make sure these accounts
are granted access rights to the DB and config file.
BTW. It's realy a bad idea to run user programs in the security context of a
screensaver.

Willy.

"Simon Mercer" <si**********@kynetix.com> wrote in message
news:eK*************@TK2MSFTNGP09.phx.gbl...
I have been trying to build a screensaver that will connect to a database
and display specific data depending on the user that is logged in. I have
managed to get a simple data access screensaver to work, however, i can't
get the application to work with some prebuilt assemblies i have. Also,
when the screensaver is running under the windows screensaver settings it
also will not access the config file.

Any pointers would be greatly accepted

Simon

Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.