Changing Desktop Wallpaper from code using JPG files 
Author Message
 Changing Desktop Wallpaper from code using JPG files

I have sucessfully use SystemParametersInfo API calls for several years to
change the Wallpaper from code. I recently upgraded to Win98 and found out
that you can use JPF files as well as BMP files as Wallpaper. Neat! I
thought I'd quickly modify my code to include JPG file names and send them
using SystemParametersInfo as follows:

   iRc = SystemParametersInfo(SPIF_SETDESKWALLPAPER, 0&, "(None)",
SPIF_SENDWININICHANGE)
   DoEvents
   iRc = SystemParametersInfo(SPIF_SETDESKWALLPAPER, 0&, sFileName,
SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE)

To my chagrin, this method only works with BMP files, although I can
manually choose a JPG file from the Desktop Properties applet.

Does anyone know how to use VB code to change the Wallpaper to a JPG
file????

Alfons



Sat, 08 Mar 2003 03:00:00 GMT  
 Changing Desktop Wallpaper from code using JPG files

Quote:
>Does anyone know how to use VB code to change the Wallpaper to a JPG file????

JPEG wallpapers requires Active Desktop to be installed and enabled,
and can only be set using the Active Desktop COM object.

See the sample at http://hem.spray.se/mattias.sjogren/

Matt

============================================

  CodeHound - Free VB Search Engine
  http://www.codehound.com



Sat, 08 Mar 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Wallpaper does not change with Active Desktop

2. Change Desktop Wallpaper

3. Help API changing desktop wallpaper

4. Wallpaper does not change with Active Desktop

5. Changing wallpaper on desktop

6. Changing Wallpaper & Desktop Settings

7. How can I change the Desktop Wallpaper from a VB application

8. How to change desktop wallpaper

9. How do i do a vbscript to change my desktop wallpaper when my computer start

10. Changing HTML Wallpaper for Active Desktop

11. change the desktop wallpaper

12. Change the Desktop wallpaper

 

 
Powered by phpBB® Forum Software