I'm fairly sure you can create screensavers with.NET but are there any tutorials on doing so? and how well can you make XNA screensavers?
All screensavers have an .scr extension. Compile your code and change the .exe to .scr. Windows will recognize this as a screensaver. The last step is installation. To install your new screensaver, copy it somewhere outside of your source tree.
Now, if you press F5 in VisualStudio you’ll see your screensaver. There are a few remaining housekeeping issues. All screensavers have an .scr extension. Compile your code and change the .exe to .scr. Windows will recognize this as a screensaver.
The screensaver work is done in a Window.Loaded event. The screen maximization and animation start needs to be triggered after the windows has been loaded. All UI elements have a RenderTransform property which takes transformation objects such as TranslateTransform.
The MainWindow window is my actual screensaver. I set two events on the screensaver which close the windows in the event of a mouse or key event. There’s only a grid with my logo image.
A screensaver is just an executable named that has been renamed '.scr' :) So yes, you can make one in whatever language you like, pretty much.
Here's a nice and small tutorial that explains how to create a screensaver with C#.
As already mentioned, a screensaver is just an executable with an .scr
file extension instead of .exe
. Additionally, if you want to create a useful screensaver, you should support these command-line arguments:
/c
, /c:HWND
, /c HWND
: Configuration mode where HWND
is the handle to the window that should be used as the parent./p
, /p HWND
: Preview mode where HWND
is the handle to the parent window./s
: Run in full-screen mode
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With