Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

[java] screensaver in java

This topic is 5597 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering : is it possible to program a screensaver with java. It''s just that I have programmed some nice effects in java and it would be nice if I could use them as screensavers. BTW : I don''t know anything about screensavers ( what the difference is between screensavers and normal programs etc ..)

Share this post


Link to post
Share on other sites
Advertisement
My understanding is that a screensaver is not really any different from a regular win32 program.

You can checkout the screensaver framework at msdn.microsoft.com (do a search). It will give you an idea on how you could convert your java program.

What you might end up doing is creating a screensaver executable that instantiates the JVM to load your java app.

Share this post


Link to post
Share on other sites
Am I right when I say : making a screensaver is making an exe file and change *.exe in *.scr ???

Just as simple as that ??

Share this post


Link to post
Share on other sites
quote:
Original post by CPeX
I was wondering : is it possible to program a screensaver with java. It''s just that I have programmed some nice effects in java and it would be nice if I could use them as screensavers.

BTW : I don''t know anything about screensavers ( what the difference is between screensavers and normal programs etc ..)



I''d be impressed if it could be done only using Java because how screensavers work is pretty specific to Windows (which I''m assuming you''re using). However, there''s nothing to stop you writing a regular Win32 screensaver that starts up a Java application when it is active.

Share this post


Link to post
Share on other sites
Yes, you could take an application, change the extension to .scr and make it a screen saver. There are some specific messages you should handle, but nothing bad happened the last time I ignored them .

So you could make a skeleton Win32 app, that calls WinExec or ShellExecute to start the JVM and run the app.

Share this post


Link to post
Share on other sites
From Wotsit.org

"
SCR files are nothing more complex than .EXE files with the
extension SCR. Windows calls the .SCR file with two command-line
options:

/s to launch the screensaver
/c to configure the screensaver

For the windows control panel to recognise the screensaver, the program''s module description string must begin with SCRNSAVE: (in uppercase). So, if writing a Visual Basic screensaver, simply set the application title to something like "SCRNSAVE:Test Screensaver"

To create a new screen saver simply write a program that checks the
command-line option when starting and performs the appropriate
action. The display should use a full-screen window (usually with a
black background) and should end when any key is pressed or when the
mouse is moved.

When the program is compiled, rename the .EXE to .SCR and put it
into the Windows directory so it can be found by the screensaver
selection dialog in Windows."


#Old Steve, he said to Xerox "Boys, turn your heads and cough"
And when no-one was looking he ripped their interfaces off#
Three Dead Trolls in a Baggie on the truth behind MacOS 1

SketchSoft | SketchNews


Share this post


Link to post
Share on other sites
hmmm all the windows specific stuff is not my cup of thea.
(thats why I''m using java for everyting. I''m I wrong when I think that Swing is much easier than the windows specific stuff)

Can somenone give me the code for the most simple screensaver program that call the java vm (in c++ ~~?~~)

Or some larger screensaver code where I can cut and past ?

thanks

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!