Enlever une texture.

10/4 - 8 févr. 2001 à 12:55
cs_EBArtSoft Messages postés 4525 Date d'inscription dimanche 29 septembre 2002 Statut Modérateur Dernière intervention 22 avril 2019 - 3 août 2007 à 10:38
J'ai récupéré ce code sur ce site pour appliquer une texture. Il marche très bien & je félicite son auteur dont le nom m'echappe. Mais comment on fait pour enlever la texture ?

Sub BackPicture(Ctl As VB.Form, ByVal pic As String)
Dim img() As VB.Image
ReDim Preserve img(1)
Set img(0) = Ctl.Controls.Add("VB.image", "img")
img(0).Picture = LoadPicture(pic)
hmax = Screen.Width / img(0).Width + 2
vmax = Screen.Height / img(0).Height + 2
For l = 1 To vmax
For h = 1 To hmax
cpt = cpt + 1
ReDim Preserve img(cpt)
Set img(cpt) = Ctl.Controls.Add ("VB.image", "img" & cpt)
With img(cpt)
.Visible = True
.Picture = img(0).Picture
.Top = l * .Height - (.Height)
.Left = h * .Width - (.Width)
End With
Next
Next
End Sub

1 réponse

cs_EBArtSoft Messages postés 4525 Date d'inscription dimanche 29 septembre 2002 Statut Modérateur Dernière intervention 22 avril 2019 9
3 août 2007 à 10:38
Cette discussion a été cloturée. Veuillez lancer une nouvelle discussion si votre question est toujours d'actualite.

Merci
0
Rejoignez-nous