Jump to content

  • Log In with Google      Sign In   
  • Create Account


[java] How to set desktop wallpaper


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Felix02   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 November 2000 - 06:20 AM

I''ve searched for some java code that is capable of resetting the desktop''s wallpaper, but I haven''t been able to find any that works. Can anyone help? THanks in advance.

Sponsor:

#2 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 18 November 2000 - 02:12 PM

why would you ever want to do that? Do you know how angry you might make some people who run your program?

#3 Felix02   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 November 2000 - 05:29 PM

Its not for the public, but rather myself, and possibly an applet version for anyone who cares- forewarned of course.

#4 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 18 November 2000 - 06:21 PM

oh ok. No I don''t know how to do it. You probably can''t just use java to do that, since java is sort of a lowest common denomimator thing, it has to work on all platforms.

#5 felonius   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 November 2000 - 08:17 PM

Yup,

You cannot do this in Java, as it requires win32 calls.

You can do it via JNI, though. I must admit, though, that I don''t know the exact calls to use. But it can be done.

Jacob Marner



#6 snowmoon   Members   -  Reputation: 122

Like
Likes
Like

Posted 19 November 2000 - 02:37 AM

Yes, it can be done. I''ve played with this idea before and it could be applied to java as well. All you need to do it..

1) It must be running as an application! This can NOT be done from an applet.

2) You need a Image -> BMP converter

3) Basic understanding of regedit files.

Ok to make life easier if you settle on one filename for you wallpaper it will make it easier. Set it up the way you want and export ( in regedit )

HKEY_LOCAL_USER/Control Panel/Desktop

Delete all unnecessary config lines from the file and save this as restoreWall.reg or something to that extent. Now whenever you want to restore your wallpaper or install a new one, just drop your .bmp over the old one and call "regedit -q restoreWall.reg".

Unfortunatly you will need to restart to make this work. You may be able to do something cleaner with the M$ java com interface but I''m not the one to ask.

#7 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 19 November 2000 - 02:52 AM

Make JNI function that calls SystemParametersInfo.
with the uiAction parameter set to SPI_SETDESKWALLPAPER.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS