December 04, 2020, 10:48:59 AM

Author Topic: [bb] Change Desktop Wallpaper by Eikon [ 1+ years ago ]  (Read 604 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] Change Desktop Wallpaper by Eikon [ 1+ years ago ]
« on: June 29, 2017, 12:28:38 AM »
Title : Change Desktop Wallpaper
Author : Eikon
Posted : 1+ years ago

Description : userlib

Code :
Code: BlitzBasic
  1. ; Required Userlib
  2. ; .lib "user32.dll"
  3. ; SystemParametersInfo%(uAction%, uParam%, lpvParam$, fuWinIni%):"SystemParametersInfoA"
  4.  
  5. AppTitle "Change Desktop Wallpaper by Eikon"
  6. Graphics 640, 320, 16, 2
  7.  
  8. Const SET_WALLPAPER% = 20
  9. Const UPDATE_INI_FILE% = 1
  10.  
  11. file$ = "Cash Out.bmp" ; Change to path of the wallpaper
  12.  
  13. ret% = SystemParametersInfo(SET_WALLPAPER%, 0, file$, UPDATE_INI_FILE%)
  14. If Not ret% Then RuntimeError "Set Wallpaper failed!"


Comments :


jfk EO-11110(Posted 1+ years ago)

 cool!


RGR(Posted 1+ years ago)

 Doesn't work with jpg ... only bmp filesI found this searching the web:<div class="quote"> If I set a JGP as wallpaper, Windows XP converts it to a BMP and saves it in'C:Documents and SettingsRGRLocal SettingsApplication DataMicrosoftWallpaper1.bmp' and sets that BMP as the wallpaper.The registry entries which relate to this are: 'HKEY_CURRENT_USERControl PanelDesktopConvertedWalpaper' = JPG file'HKEY_CURRENT_USERControl PanelDesktopOriginalWallpaper' = BMP file'HKEY_CURRENT_USERControl PanelDesktopWallpaper' = BMP file </div>


Boiled Sweets(Posted 1+ years ago)

 WOT ABOUT A MAX VERSION?


zortzblatz(Posted 1+ years ago)

 This doesn't work, it gives me an error that says "Function 'systemparametersinfo' not found.".


*(Posted 1+ years ago)

 zortzblatz create a decls file with the
Code: [Select]
; Required Userlib
 .lib "user32.dll"
 SystemParametersInfo%(uAction%, uParam%, lpvParam$, fuWinIni%):"SystemParametersInfoA"
in it called user32.decls in the decls folder of blitz and it should work.


zortzblatz(Posted 1+ years ago)

 Okay, now a window pops up titled "Change Desktop Wallpaper by Eikon". It changes size once then closes leaving the wallpaper unchanged. On the plus side it rune and compiles without error =D Any other suggestions? [/i]

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal