8 Replies - 3223 Views - Last Post: 04 August 2010 - 08:33 AM

#1 RandomlyKnighted  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 117
  • View blog
  • Posts: 1,365
  • Joined: 14-January 10

Best language for Desktop Wallpaper/Screensaver?

Posted 30 July 2010 - 02:56 PM

Ok, so I know this guy that wants me to make an application for him as either a desktop wallpaper or a screensaver. He wants me to find a picture of a cottage and as the time of day changes he wants it the sky to change from daylight to dark depending on the time of day. Would Java be the best way to do this?

Thanks everyone!
Is This A Good Question/Topic? 0
  • +

Replies To: Best language for Desktop Wallpaper/Screensaver?

#2 sh1n3  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 24
  • View blog
  • Posts: 164
  • Joined: 22-April 10

Re: Best language for Desktop Wallpaper/Screensaver?

Posted 30 July 2010 - 06:08 PM

There's no straightforward way of doing that. Setting the wallpaper is part of Windows, and Java doesn't attempt to be a Windows-specific programming language. So you don't have direct access to any
of the Windows APIs.
Was This Post Helpful? 0
  • +
  • -

#3 sh1n3  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 24
  • View blog
  • Posts: 164
  • Joined: 22-April 10

Re: Best language for Desktop Wallpaper/Screensaver?

Posted 30 July 2010 - 06:30 PM

But may have something that you could try. In Windows there is a file called background.bmp (not sure about the extension) ,it stores the image of the desktop background. If you are familiar with ImageIO then the solution is simple - overwrite that file. But the changes can only be seen after restart. It won't help you if you never switch off your computer. I don't know if this works, theoretically it should.
Was This Post Helpful? 0
  • +
  • -

#4 RandomlyKnighted  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 117
  • View blog
  • Posts: 1,365
  • Joined: 14-January 10

Re: Best language for Desktop Wallpaper/Screensaver?

Posted 30 July 2010 - 07:32 PM

What would be the easiest language to do this in since Java wouldn't be the best choice? I figured Java would be the easiest since it is so graphically and OOP orientated.
Was This Post Helpful? 0
  • +
  • -

#5 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2871
  • View blog
  • Posts: 11,026
  • Joined: 15-July 08

Re: Best language for Desktop Wallpaper/Screensaver?

Posted 30 July 2010 - 08:36 PM

The issue is not the paradigm (OOP), it is simply that because Java is cross-platform, specific OS tasks cannot easily be done with Java. I'd suggest C/C++ if you know it, or even better is C#. C# is very similar to Java, but runs on Windows specifically, so it can do things like that. However, I am not a C# person, so I don't know how it would integrate with the OS.

Since now we are moving into a slightly different topic, I'll rename this topic and move it to Corner Cubical for further discussion.
Was This Post Helpful? 0
  • +
  • -

#6 moopet  Icon User is offline

  • binary decision maker
  • member icon

Reputation: 339
  • View blog
  • Posts: 1,185
  • Joined: 02-April 09

Re: Best language for Desktop Wallpaper/Screensaver?

Posted 31 July 2010 - 01:17 AM

There are applications out there which do wallpaper switching. If you took a dozen pictures of the cottage, and put them in a folder that was being monitored by such a program, and got it to cycle through them one change every two hours, preferably with a fade-effect transition... that'd do it, right?

Dirty, dirty hack: Give him active desktop and point it at file:////c://my_animated.gif :)
Was This Post Helpful? 0
  • +
  • -

#7 WolfCoder  Icon User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 783
  • View blog
  • Posts: 7,610
  • Joined: 05-May 05

Re: Best language for Desktop Wallpaper/Screensaver?

Posted 01 August 2010 - 09:12 PM

I think I did something like this before, but I think you have to mess with the registry and get the computer to refresh the entire desktop. I think you can do the latter by getting the HWND for it (I did this in my very very old screen-shattering joke program) and calling InvalidateRect with NULL on it. That might work. WIN32 API for the win~
Was This Post Helpful? 0
  • +
  • -

#8 RandomlyKnighted  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 117
  • View blog
  • Posts: 1,365
  • Joined: 14-January 10

Re: Best language for Desktop Wallpaper/Screensaver?

Posted 03 August 2010 - 06:44 PM

I kinda figured you could do it without registry hacks or any other hack for that matter. What about VB or C#? Those are 2 good OOP languages do you think I might could do them in it?
Was This Post Helpful? 0
  • +
  • -

#9 D.Mulroy  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 81
  • View blog
  • Posts: 430
  • Joined: 30-June 10

Re: Best language for Desktop Wallpaper/Screensaver?

Posted 04 August 2010 - 08:33 AM

View PostDogstopper, on 30 July 2010 - 07:36 PM, said:

The issue is not the paradigm (OOP), it is simply that because Java is cross-platform, specific OS tasks cannot easily be done with Java. I'd suggest C/C++ if you know it, or even better is C#. C# is very similar to Java, but runs on Windows specifically, so it can do things like that. However, I am not a C# person, so I don't know how it would integrate with the OS.

Since now we are moving into a slightly different topic, I'll rename this topic and move it to Corner Cubical for further discussion.


As Dogstopper said, C# would be your best bet. Especially if you already know java since they have similar syntax. C# is a windows specific language (for the most part), and most likely has features that can help you out.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1