홈 · 개발 참고자료

개발 참고자료

[파워빌더] Set the wallpaper

작성자
관리자
작성일
2016-10-16
조회
9883
분류
파워빌더
First we need a local function declaration[local function declaration]
FUNCTION ulong SystemParametersInfoA( ulong ul_action, &
ulong ul_iParam, string s_bitmap, ulong ul_winIni ) &
LIBRARY "USER32"

And then from Powerscript[powerscript]

CONSTANT ulong SPISETDESKWALLPAPER = 20

// to make the change permanent
CONSTANT ulong SPIUPDATEINIFILE = 1

string ls_wallpaper

// only BMP is possible
// to use a JPG, you need to convert it to BMP first.
ls_wallpaper = "C:\WINDOWS\Zapotec.bmp"

SystemParametersInfoA( SPISETDESKWALLPAPER, 0, &
ls_wallpaper, SPIUPDATEINIFILE )