Returns an Image object based on a bitmap resource that is embedded in an assembly.
Assembly: System.Drawing (in System.Drawing.dll)
- Type: System.Type
This method searches for an embedded bitmap resource in the assembly that defines the type specified by the t parameter. For example, if you pass typeof(ControlA) to the t parameter, then this method searches the assembly that defines ControlA.
- Type: System.String
The name of the embedded bitmap resource.
- Type: System.Boolean
Specifies whether this method returns a large image (true)or a small image (false). The small image is 16 by 16, and the large image is 32 x 32.
This method searches for a resource named namespace.imgName, where namespace is the namespace containing the definition of the type specified by the t parameter. For example, suppose you pass typeof(ControlA) to the t parameter and you pass "MyBitmap.bmp" to the imgName parameter. If ControlA is in NamespaceA in AssemblyA.dll, then this method searches AssemblyA.dll for a resource named NamespaceA.MyBitmap.bmp.
This method is intended to retrieve a 16 x 16 bitmap resource that is embedded in an assembly. However, there is no requirement that the embedded bitmap has a size of 16 x 16. The bitmap that is retrieved from the assembly (no matter what size) is considered the small image. The large image is created by scaling the "small" image to a size of 32 x 32. So the large image will always be 32 by 32, regardless of the size of the bitmap retrieved from the assembly.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.