Public Function DrawIcon(ByVal sSource As String, ByVal lDestHDC As Long, ByVal lLeft As Long, ByVal lTop As Long)
Dim mIcon As Long
'Extrait l'icone associée à un fichier (ou un lien nlk)
mIcon = ExtractAssociatedIcon(App.hInstance, sSource, 2&)
DrawIconEx lDestHDC, 0, 0, mIcon, 0, 0, 0, 0, DI_IMAGE
DestroyIcon mIcon
End Function
'''Après avoir récupéré la liste des programmes du bureau dans le registre (et le fond d'écran)...dans une listbox [Me.ListProgBureau]
Private Sub ExtractIco_Click()
For a = 0 To Me.ListProgBureau.ListCount - 1
Load Me.Picture1(a + 1)
Me.Picture1(a + 1).Left = Me.Picture1(0).Left + (1000 * (a + 1))
Me.Picture1(a + 1).Top = Me.Picture1(a).Top
Me.Picture1(a + 1).Visible = True
sSource = Me.ListProgBureau.List(a)
lDestHDC = Me.Picture1(a).hdc
lLeft 1: lTop 1
xx = DrawIcon(sSource, lDestHDC, lLeft, lTop)
DoEvents
Next a
End Sub
MAIS LE RESULTAT EST PAS BO!!!