• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Ruby [Ruby] Funcion cambiarfondo()

Status
Not open for further replies.

Doddy

Leech
User
Joined
Apr 1, 2012
Messages
169
Reputation
0
Reaction score
406
Points
63
Credits
0
‎13 Years of Service‎
57%
Una simple funcion en ruby para cambiar el fondo de Windows, lo eh probado en window seven y anda bien.

Code:
>
#!usr/bin/ruby
#Funcion cambiarfondo()
#Based on a code of protos

require "Win32API"

def cambiarfondo(imagen)
 fondo = Win32API.new("user32", "SystemParametersInfo", ['L', 'L', 'P', 'L'], 'L') 
 fondo.Call(20, 0, imagen, 0)
end

cambiarfondo("fondo/test.jpg");

#The End ?
 
Status
Not open for further replies.
Back
Top