Language: VB4/32,VB5,VB6 Expertise: Intermediate
Apr 7, 2001
WEBINAR:
On-Demand
Application Security Testing: An Integral Part of DevOps
GetSystemIcon - Get a Windows standard icon as a StdPicture object
Private Declare Function LoadStandardIcon Lib "user32" Alias "LoadIconA" (ByVal _
hInstance As Long, ByVal lIconID As Long) As Long
Enum SystemIconConstants
IDI_Application = 32512
IDI_Hand = 32513
IDI_Question = 32514
IDI_Exclamation = 32515
IDI_Asterisk = 32516
IDI_Windows = 32517
End Enum
' returns a Windows standard icon
' (e.g. the icons used in the Message Boxes)
'
' Requires the IconToPicture function
Function GetSystemIcon(ByVal ID As SystemIconConstants) As StdPicture
'get the standard icon's handle by calling LoadStandardIcon and then
'convert it to a StdPicture object
Set GetSystemIcon = IconToPicture(LoadStandardIcon(0, ID))
End Function
Marco Bellinaso
|