Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than shell32, prefix the name with the module name and a period.
Public Shared Function GetShildIcon(iconType As SHSTOCKICONID) As IntPtr
Dim sii As New SHSTOCKICONINFO()
sii.cbSize = Marshal.SizeOf(GetType(SHSTOCKICONINFO))
If SHGetStockIconInfo(iconType, SHGSI.SHGSI_ICON Or SHGSI.SHGSI_SMALLICON, sii) = 0 Then
Return sii.hIcon
End If
Return IntPtr.Zero
End Function
Dim hIcon As IntPtr = GetShildIcon(SHSTOCKICONID.SIID_SHIELD)
If hIcon <> IntPtr.Zero Then
Me.Icon = Icon.FromHandle(hIcon)
DestroyIcon(hIcon)
End If
SHSTOCKICONID is used by SHGetStockIconInfo to identify a stock icon.
9/26/2021 3:05:42 AM - thediscover22450@gmail.com-86.253.38.65
Used by SHGetStockIconInfo to determine the information to be retrieved for a stock icon.
9/26/2021 3:18:13 AM - thediscover22450@gmail.com-86.253.38.65
Used by SHGetStockIconInfo
9/13/2021 9:04:23 PM - -140.177.251.69
Retrieves information about a stock icon
3/1/2017 5:58:51 AM - -88.235.99.88
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).