Public Function ExtractIcon(picImage As PictureBox)
Dim himl As Long
Dim lpzxExeName As String
Dim lRet As Long
Dim sWinPath As String
Dim shinfo As SHFILEINFO
'sWinPath = GetWinPath()
lpzxExeName = "C:\windows\explorer.exe"
himl = SHGetFileInfo(lpzxExeName, 0&, shinfo, Len(shinfo), _
SHGFI_SYSICONINDEX Or SHGFI_SMALLICON)
If himl <> 0 Then
picImage.AutoRedraw = True
lRet = ImageList_Draw(himl, shinfo.iIcon, picImage.hDC, 0, 0, _
ILD_TRANSPARENT)
picImage.Refresh
ExtractIcon = True
End If
End Function