B4J Library WindowsBackgroundSetter

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear Roycefer,

please can I know details of this Lib? Please?

Thank you very much
p4ppc
 

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear Roycefer,

thank you very much, very useful!

Bet regards
p4ppc
 

inakigarm

Well-Known Member
Licensed User
Longtime User
Programmatically set the Windows desktop background. Obviously, this is Windows-only. I've only tested it on Windows 7.

You need to have jna-4.3.0.jar and jna-platform-4.3.0.jar in your Additional Libraries folder. https://github.com/java-native-access/jna
@Roycefer ,Don't you mind to share the source and how you build the library? I tried to build the solution from a java code from stackoverflow and jna but I can't got working

Thanks !
 

Roycefer

Well-Known Member
Licensed User
Longtime User
Yeah, attached is the single .java file. You'll need the aforementioned jna-related .jars in your Java project's library folder (<project root>/libs). Then clean and build and then compile with SimpleLibraryCompiler.

I reviewed the Stack Overflow literature on this topic as well a few blog posts. None of the code snippets I found worked but they did get me close to the working solution embodied in the attached.

Dearest Erel,
When trying to upload the .java file to this post, I got an error saying that that file extension was not allowed. This seems like a very strange policy for a forum based on products that rely so heavily on Java code. Is there some specific reason for this?
 

Attachments

  • WindowsBackgroundSetter.zip
    893 bytes · Views: 276
Top