SystemIcons.GetStockIcon Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetStockIcon(StockIconId, StockIconOptions) |
Gets the specified Windows shell stock icon. |
GetStockIcon(StockIconId, Int32) |
Gets the specified Windows shell stock icon. |
GetStockIcon(StockIconId, StockIconOptions)
- Source:
- SystemIcons.cs
- Source:
- SystemIcons.cs
- Source:
- SystemIcons.cs
Gets the specified Windows shell stock icon.
public static System.Drawing.Icon GetStockIcon (System.Drawing.StockIconId stockIcon, System.Drawing.StockIconOptions options = System.Drawing.StockIconOptions.Default);
static member GetStockIcon : System.Drawing.StockIconId * System.Drawing.StockIconOptions -> System.Drawing.Icon
Public Shared Function GetStockIcon (stockIcon As StockIconId, Optional options As StockIconOptions = System.Drawing.StockIconOptions.Default) As Icon
Parameters
- stockIcon
- StockIconId
The stock icon to retrieve.
- options
- StockIconOptions
A bitwise combination of the enumeration values that specifies options for retrieving the icon.
Returns
The requested Icon.
Exceptions
stockIcon
is an invalid StockIconId.
Remarks
Unlike the static icon properties in SystemIcons, this API returns icons that are themed for the running version of Windows. Additionally, the returned Icon is not cached and should be disposed when no longer needed.
Applies to
GetStockIcon(StockIconId, Int32)
- Source:
- SystemIcons.cs
- Source:
- SystemIcons.cs
- Source:
- SystemIcons.cs
Gets the specified Windows shell stock icon.
public:
static System::Drawing::Icon ^ GetStockIcon(System::Drawing::StockIconId stockIcon, int size);
public static System.Drawing.Icon GetStockIcon (System.Drawing.StockIconId stockIcon, int size);
static member GetStockIcon : System.Drawing.StockIconId * int -> System.Drawing.Icon
Public Shared Function GetStockIcon (stockIcon As StockIconId, size As Integer) As Icon
Parameters
- stockIcon
- StockIconId
The stock icon to retrieve.
- size
- Int32
The desired size. If the specified size does not exist, an existing size will be resampled to give the requested size.
Returns
The requested Icon.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기