LoadPicture
Sinistrus
Messages postés
1010
Date d'inscription
Statut
Membre
Dernière intervention
-
un_neurone -
un_neurone -
Bonjour à tous et bonne année !
Je débute cette année avec un petit problème d'affichage d'image :s
Ce code me permet d'afficher l'image PIC_Wallpaper0 dans PIC_Wallpaper1
Avez-vous une idée svp ?
Je débute cette année avec un petit problème d'affichage d'image :s
Ce code me permet d'afficher l'image PIC_Wallpaper0 dans PIC_Wallpaper1
PIC_Wallpaper1.Width = Me.Width PIC_Wallpaper1.Height = Me.Height If PIC_Wallpaper0.Width < PIC_Wallpaper1.Width And PIC_Wallpaper0.Height < PIC_Wallpaper1.Height Then Coeff = 1 X = (PIC_Wallpaper1.Width - PIC_Wallpaper0.Width) / 2 Y = (PIC_Wallpaper1.Height - PIC_Wallpaper0.Height) / 2 GoTo Affiche_image End If 'definition du coefficient selon l'orientation de l'image If PIC_Wallpaper0.Width > PIC_Wallpaper0.Height Then Coeff = PIC_Wallpaper0.Width / PIC_Wallpaper1.Width X = 0 Y = (PIC_Wallpaper1.Height - (PIC_Wallpaper0.Height / Coeff)) / 2 Else Coeff = PIC_Wallpaper0.Height / PIC_Wallpaper1.Height X = (PIC_Wallpaper1.Width - (PIC_Wallpaper0.Width / Coeff)) / 2 Y = 0 End If Affiche_image: NewLargeur = PIC_Wallpaper0.Width / Coeff NewHauteur = PIC_Wallpaper0.Height / Coeff PIC_Wallpaper1.PaintPicture PIC_Wallpaper0.Picture, X, Y, NewLargeur, NewHauteurIl fonctionne très bien, mais je souhaite que chaque chaque jour il affiche une nouvelle image (au load) dans le PIC_wallpaper0 et qu'il soit pris en compte par PIC_wallpaper1.
Avez-vous une idée svp ?