DirectoryInfoExtensionsExtractIcon Method
Extracts the icon associated for the source directory.
Namespace: DevCase.Extensions.DirectoryInfoExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static Bitmap ExtractIcon(
this DirectoryInfo directory,
IconSizes iconSize = IconSizes._256x256
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function ExtractIcon (
directory As DirectoryInfo,
Optional iconSize As IconSizes = IconSizes._256x256
) As Bitmap
Dim directory As DirectoryInfo
Dim iconSize As IconSizes
Dim returnValue As Bitmap
returnValue = directory.ExtractIcon(iconSize)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static Bitmap^ ExtractIcon(
DirectoryInfo^ directory,
IconSizes iconSize = IconSizes::_256x256
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member ExtractIcon :
directory : DirectoryInfo *
?iconSize : IconSizes
(* Defaults:
let _iconSize = defaultArg iconSize IconSizes._256x256
*)
-> Bitmap
No code example is currently available or this language may not be supported.
- directory DirectoryInfo
-
The source DirectoryInfo.
- iconSize IconSizes (Optional)
-
The icon size to extract.
Default value is _256x256
Bitmap
The resulting icon.
In Visual Basic and C#, you can call this method as an instance method on any object of type
DirectoryInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Dim dir As New DirectoryInfo("C:\Windows")
Dim bmp As Bitmap = ExtractIcon(dir)
PictureBox1.BackgroundImage = bmp
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.