Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to change a desktop?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00757797
Message ID:
00758230
Views:
17
Hi Anatoliy,
I tried the same code and the result is 1 (no error) but no change takes effect. Using VFP7 SP1 and VFP8 on W2k SP3:
nresult=p3()
IF nresult = 0
   ? 'Error:', GetLastError()
ELSE
   ? 'Result: ' +ALLTRIM(STR(nresult))
ENDIF

FUNCTION  p3
   * setting a wallpaper
   #DEFINE SPI_SETDESKWALLPAPER    20

   DECLARE INTEGER SystemParametersInfo IN user32;
      INTEGER uiAction, INTEGER uiParam,;
      STRING @pvParam, INTEGER fWinIni

   LOCAL lcWallpaper
   lcWallpaper="C:\winnt\haley.bmp"  && I know this exists

   nresult    = SystemParametersInfo (SPI_SETDESKWALLPAPER,;
      0, @lcWallpaper, 0)

   RETURN nresult
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform