Changing wallpaper on desktop 
Author Message
 Changing wallpaper on desktop

How do I change the desktop's wallpaper from within a VB app?  Could
someone supply me with the proper API call?  

Thanks!
Mike Anderson
Mb. Education & Training
307- 1181 Portage Ave
Winnipeg, Manitoba
(204) 945-1848




Sun, 27 Feb 2000 03:00:00 GMT  
 Changing wallpaper on desktop

Go to my homepage (address in sig) and look at Article #00008 in the
KnowledgeBase section.
--
Ben Baird
Microsoft SiteBuilder Network Level 2
Visual Basic Thunder, version 2.0
http://www.{*filter*}highway.com/~psy/
Compatible with Netscape, IE3 & IE4!


Quote:
>How do I change the desktop's wallpaper from within a VB app?  Could
>someone supply me with the proper API call?



Mon, 28 Feb 2000 03:00:00 GMT  
 Changing wallpaper on desktop

From the FAQ document
Quote

I'm surprised this isn't in the FAQ yet. [ED: now it is!] You need the
SystemParametersInfo API function and the SPI_SETDESKWALLPAPER constant.

For this you will need the following constants and function declaration...

Const SPI_SETDESKWALLPAPER = 20
Const SPIF_SENDWININICHANGE = &H2
Const SPIF_UPDATEINIFILE = &H1

Declare Function SystemParametersInfo Lib "User" (ByVal uAction As Integer,
ByVal uParam As Integer, lpvParam As Any, ByVal fuWinIni As  Integer) As
Integer

'You then call the function as follows...

Result% = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, ByVal BMPFile$,
SPIFlags%)

'... where SPIFlags% is 0 if the change is not to be made permanent, or

'(SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE) if it is to be carried
across into future Windows sessions.

NOTE: Please be certain to include the ByVal keyword before the bitmap
filename, as this argument is declared as Any, NOT as ByVal String.

Unquote

--
Henri
remove "MyName"



: How do I change the desktop's wallpaper from within a VB app?  Could
: someone supply me with the proper API call?  
:
: Thanks!
: Mike Anderson
: Mb. Education & Training
: 307- 1181 Portage Ave
: Winnipeg, Manitoba
: (204) 945-1848
:

:
:



Tue, 29 Feb 2000 03:00:00 GMT  
 
 [ 3 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 & Desktop Settings

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

7. How to change desktop wallpaper

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

9. Changing HTML Wallpaper for Active Desktop

10. Changing Desktop Wallpaper from code using JPG files

11. change the desktop wallpaper

12. Change the Desktop wallpaper

 

 
Powered by phpBB® Forum Software