1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| Function ChangerFondEcran(Fichier As String)
CURRENT_JPG_WALLPAPER = Fichier
EcrireINI INI_FILE, "WALLPAPER", "Current", CURRENT_JPG_WALLPAPER
ConvertPictureFileToBitmap Fichier, WALLPAPER_BMP
Retval = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, ByVal WALLPAPER_BMP, SPIF_UPDATEINIFILE)
If (Retval = 0) Then MsgBox "Erreur dans l'affichage du fond d'écran !", vbCritical, App.Title
EcrireINI INI_FILE, "WALLPAPER", "STYLE", CStr(WALLPAPER_STYLE)
LAST_CHANGE_DATE = Get_Date(Date)
LAST_CHANGE_TIME = Get_Heure(time$)
EcrireINI INI_FILE, "WALLPAPER", "LastChange", CStr(LAST_CHANGE_DATE & " " & LAST_CHANGE_TIME)
Maj_NextWallpaper
End Function |
Partager