- Home
·
- Graphics
·
- If you use the Shell Icons you will need this...
If you use the Shell Icons you will need this...
If you use the Shell Icons you will need this...
API Declarations
Public Const SMALL_ICON As Integer = 16
Public Const DI_NORMAL = 3
Public Declare Function DrawIconEx Lib "user32" (ByVal hdc As Long, ByVal xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal cxWidth As Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long, ByVal hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As Long
Public 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
Rate If you use the Shell Icons you will need this...
(1(1 Vote))
Dim LargeIcon As Long, SmallIcon As Long
Dim iLargeIcon As Long, iSmallIcon As Long
Dim FileIcon As String
a = ExtractIconEx(FileExe, Index, LargeIcon, SmallIcon, 1)
GoTo AfterThisLot
' Draw the icon to respective picturebox control.
AfterThisLot:
With PicIn
Set .Picture = LoadPicture("")
.AutoRedraw = True
If bLargeIcon = True Then
Call DrawIconEx(.hdc, 0, 0, LargeIcon, Iconsize, Iconsize, 0, 0, DI_NORMAL)
Else
Call DrawIconEx(.hdc, 0, 0, SmallIcon, Iconsize, Iconsize, 0, 0, DI_NORMAL)
End If
.Refresh
End With
ExtractIcon = a
End Function
If you use the Shell Icons you will need this... Comments
No comments yet — be the first to post one!
Post a Comment