Wallpaper

niketou Messages postés 295 Date d'inscription dimanche 4 mai 2003 Statut Membre Dernière intervention 6 décembre 2010 - 23 juin 2005 à 11:19
Gobillot Messages postés 3140 Date d'inscription vendredi 14 mai 2004 Statut Membre Dernière intervention 11 mars 2019 - 23 juin 2005 à 14:19
Salut a tous
Je veux faire un soft qui change le papier peint du bureau
donc j'ai telechargé des sources avec l'api.
SystemParametersInfo 20, 0, Fond, 1

ou
SystemParametersInfo 20, 0, Fond, 0

ou
RetVal = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, Fond,1)
Le probleme c'est que cela change le papier peint quand je redemare l'ordi et pas directement.
Des solutions?.
Merci a tous.

3 réponses

cs_DARKSIDIOUS Messages postés 15814 Date d'inscription jeudi 8 août 2002 Statut Membre Dernière intervention 4 mars 2013 130
23 juin 2005 à 11:54
Va voir les sources qui permettent de faire cà, il en existe une bonne dizaine.

DarK Sidious

Un API Viewer (pour le VB, VB.NET, C, C# et Delphi) : www.ProgOtoP.com/popapi/
0
niketou Messages postés 295 Date d'inscription dimanche 4 mai 2003 Statut Membre Dernière intervention 6 décembre 2010
23 juin 2005 à 12:12
Pardon mais inutile de poster pour ne rien dire.
Merci de lire ma question.
0
Gobillot Messages postés 3140 Date d'inscription vendredi 14 mai 2004 Statut Membre Dernière intervention 11 mars 2019 34
23 juin 2005 à 14:19
Const SPI_GETDESKWALLPAPER = 115



Private 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





'le principe est de récupèrer le papier peint en début de programme

'et de le remettre à la fin



Dim strFullPathWallpaper As String

strFullPathWallpaper = Space$(255)

SystemParametersInfo SPI_GETDESKWALLPAPER, 255, ByVal strFullPathWallpaper, 0

strFullPathWallpaper = Left$(strFullPathWallpaper, InStr(strFullPathWallpaper, vbNullChar) - 1)



MsgBox strFullPathWallpaper




Daniel
0
Rejoignez-nous