Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Set image as background

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got a dumb question....
I've developed a website for a client that posts pictures for people to come and download and email to friends. My client has requested that I give the ability to set the photo as the background of the users desktop. I know this can be done by right-clicking on the image and clicking on the "set as background" (ie). My client would like this to be a button on the page
Is this possible thru JavaScript?
 
Sheriff
Posts: 67641
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's certainly no standard way of doing this. I'd suspect that IE has Windows-specfic extensions to do this so I'd poke around the Microsoft site a bit.
Whatever solution you come up with will probably be limited to Windows and IE.
hth,
bear
 
Author
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you imagine if web sites *could* arbitrarily run JavaScript code to change the Windows wallpaper? What a perfectly sneaky way to advertise.
The short answer is that it's not possible in JavaScript. Not even using IE extensions.
There is a "external.AddDesktopComponent()" method that will add things (such as images) to the Active Desktop, but users will have to have Active Desktop turned on and it normally isn't.
But that's not the same as wallpaper. The closest you might come is to create your own BHO (Browser Helper Object) or ActiveX control and hook into the Windows API. But that's a lot of work just to set the background wallpaper...
 
Jason Brawner
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Scott,
Your right about the advertisers. Now that you put it in that perspective the answer is obviously NO. I guess I wasn't thinking...
Thanks for the replies.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic