Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "Win32API.inc"
Function PBMain() As Long
Local w,h As Long
'system large
? "System Large: " + Str$(GetSystemMetrics(%SM_cxIcon)) + Str$(GetSystemMetrics(%SM_cyIcon))
'system small
? "System Small: " + Str$(GetSystemMetrics(%SM_cxsmIcon)) + Str$(GetSystemMetrics(%SM_cysmIcon))
'shell small
' SHGetFileInfo SHGFI_SHELLICONSIZE | SHGFI_SMALLICON 'handle to system image list
' ImageList_GetIconSize 'icon size
'shell large
' SHGetFIleInfo SHGFI_SHELLICONSIZE 'handle to system image list
' ImageList_GetIconSize 'icon size
'To get handle to standard icon:
'hIcon = LoadIcon(%Null, %IDI_Exclamation)
'To get handle to icon in an EXE
'hICon = LoadIcon( GetModuleHandle(""), "#100")
'The name of the icon resource to be loaded.
'Alternatively, this parameter can contain the
'resource identifier in the low-order word and '
'zero in the high-order word. Use the MAKEINTRESOURCE
'macro to create this value.
'CreateIconFromResource, DrawIcon, ExtractAssociatedIcon, ExtractIcon,
'ExtractIconEx, and LoadIcon functions all use system large icons.
'Size of the system large icon is defined by video driver and cannot be changed.
End Function
'gbs_00862
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm