Главная страница | назад





Article #17607: Changing the Windows wallpaper in code?

 Question and Answer Database

FAQ2607D.txt - Changing the Windows wallpaper in code?

Category   :Windows API
Platform   :All-32Bit
Product    :

Question:
How do I change the Windows wallpaper in code?


Answer:
Call the Windows API function SystemParametersInfo() 
passing the SPI_SETDESKWALLPAPER parameter along with 
the filename of the new bitmap to use.

Example:

  SystemParametersInfo(SPI_SETDESKWALLPAPER,
                       0,
                       PChar('C:\SOMEPATH\SOME.BMP'),
                       SPIF_SENDWININICHANGE);


4/2/99 12:26:15 PM
 

Last Modified: 01-SEP-99