?? apiicondispenser.cls
字號:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "ApiIconDispenser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Private Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long
'\\ --[IconsFromFilename]-------------------------------------------------------------------
'\\ Returns a collection of ApiIcon objects from the filename given.
'\\ ----------------------------------------------------------------------------------------
'\\ (c) 2001 - Merrion Computing. All rights to use, reproduce or publish this code reserved
'\\ Please check http://www.merrioncomputing.com for updates.
'\\ ----------------------------------------------------------------------------------------
Public Property Get IconsFromExeFilename(ByVal Filename As String) As Collection
Dim lIndex As Long
Dim lIconCount As Long
Dim lRet As Long
Dim colIcons As Collection
Dim thisIcon As ApiIcon
'\\ Initialise the collection
Set colIcons = New Collection
'\\ Get the number of items
lIconCount = ExtractIcon(App.hInstance, Filename, -1)
If lIconCount > 0 Then
For lIndex = 0 To lIconCount - 1
lRet = ExtractIcon(App.hInstance, Filename, lIndex)
If lRet > 0 Then
Set thisIcon = New ApiIcon
thisIcon.hIcon = lRet
colIcons.Add thisIcon
End If
Next lIndex
End If
'\\ Return the collection
Set IconsFromExeFilename = colIcons
End Property
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -