Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Simple script to change win32 wallpaper

by bbfu (Curate)
on Jul 12, 2002 at 01:54 UTC ( #181191=sourcecode: print w/ replies, xml ) Need Help??

Category: Win32 Stuff
Author/Contact Info Cory Johns (a.k.a. Bunny Boy Fu)
Description:

Simple script to change the MS Windows wallpaper from the command-line. Really just a wrapper around the SetSystemParametersInfo() API call, via Win32::API.

I'm using it as part of another small app. I'm writing (for my GF) to pick random papers. :)

#!/usr/bin/perl

use Win32::API;

use constant SPI_SETDESKWALLPAPER  => 20;
use constant SPIF_UPDATEANDSENDINI => 3;
use constant NULL                  => 0;

my $syspinf = Win32::API->new('user32','SystemParametersInfo', [I,I,P,
+I], I)
  or die "Could not import function.\n";

$syspinf->Call(SPI_SETDESKWALLPAPER, 0, $ARGV[0], SPIF_UPDATEANDSENDIN
+I);

Comment on Simple script to change win32 wallpaper
Download Code

Back to Code Catacombs

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: sourcecode [id://181191]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (12)
As of 2015-07-28 08:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls