Wallpaper

Seth77 Messages postés 572 Date d'inscription mardi 30 avril 2002 Statut Membre Dernière intervention 4 mai 2020 - 13 févr. 2005 à 01:54
cs_clafouti Messages postés 78 Date d'inscription samedi 16 mars 2002 Statut Membre Dernière intervention 7 septembre 2006 - 13 févr. 2005 à 09:16
Slu



Est il possible de mettre un JPG en fond d ecran.



SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, f$, 1)

car cette fonction utilise un BMP !



thx


Herve

1 réponse

cs_clafouti Messages postés 78 Date d'inscription samedi 16 mars 2002 Statut Membre Dernière intervention 7 septembre 2006
13 févr. 2005 à 09:16
Tu dois d'abord sauver ton image jpg dans un picture box et ensuite, créer une image bmp

Voici le code :

Public Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" _

(ByVal uAction As Long, ByVal uParam As Long, _

ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long



Public Const SPI_SETDESKWALLPAPER = 20

Public Const SPIF_SENDWININICHANGE = &H2

Public Const SPIF_UPDATEINIFILE = &H1



'pour changer le papier-peint.

'picScreen est un picturebox

Dim PictureFileName, FileJPG As String

Set picScreen.Picture = LoadPicture(PictureFileName)

SavePicture picScreen.Picture, FileJPG


SystemParametersInfo SPI_SETDESKWALLPAPER, 0&, ByVal FileJPG,
SPIF_SENDWININICHANGE Or SPIF_UPDATEINIFILE


Découvrez PrestoNotes. Nouvelle version multilingue.
0
Rejoignez-nous