From Everytime's Post:
Is there a way of finding out how many icons are in the dll, so you can loop using that? Also, will I need the path to the dll, and if so, what are the specifics on the API's to get the Win and Win\Sys dirs? Finally, what should mIcon equal?Code:Private Declare Function ExtractIconEx Lib "shell32.dll" Alias "ExtractIconExA" (ByVal lpszFile As String, ByVal nIconIndex As Long, phiconLarge As Long, phiconSmall As Long, ByVal nIcons As Long) As Long rivate Declare Function DrawIcon Lib "user32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As Long Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As Long) As Long Private Sub Form_Load() mIcon As Long, Cnt As Long For Cnt = 0 To Me.ScaleWidth / 32 ExtractIconEx "shell32.dll", Cnt, mIcon, ByVal 0&, 1 DrawIcon Me.hdc, 32 * Cnt, 0, mIcon DestroyIcon mIcon Next Cnt End Sub





Reply With Quote