IconsSystemShield Property

Shield (small version for the summary) Gets an Icon instance that contains the Shield icon as it is displayed by the current operating system.
On Windows Vista and above sizes range from 16x16 to 256x256, on Windows XP the largest resolution is 48x48, and on Linux the icon has always 32x32 and 16x16 image sizes.

See the online help for the icon images.

Definition

Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 10.0.0-rc.1
C#
public static Icon SystemShield { get; }

Property Value

Icon

Remarks

  Note

For compatibility reasons in Windows 7 and above this property returns the two-colored UAC shield as it appears in the current operating system. To return the system-specific counterpart of the Shield property (the four-colored Windows shield) you can use the FromFile(String, Int32) method on Windows 7 and above like this:
Icon systemWindowsShield = Icons.FromFile("imageres", 1028);

Examples

On Windows 11 the icon contains 8 images from 16x16 to 256x256. The 32x32 and 16x16 ones look like this:
Shield 32x32 Windows 11Shield 16x16 Windows 11

On Windows 10 the icon contains 8 images from 16x16 to 256x256. The 32x32 and 16x16 ones look like this:
Shield Windows 8/10 32x32 Windows 10Shield Windows 8/10 16x16 Windows 10

On Windows 7 and Windows 8 the icon sizes vary from 8x8 to 256x256. Windows 7 has 7 images, whereas Windows 8 has an additional 64x64 image, which is missing on Windows 7. The 32x32 and 16x16 ones look like this:
Shield Windows 7 32x32Shield Windows 7 16x16

On Windows Vista the icon contains 7 images from 8x8 to 256x256. The 32x32 and 16x16 ones look like this:
Shield Windows Vista 32x32Shield Windows Vista 16x16

On Windows XP the icon contains 3 images from 16x16 to 48x48. The 32x32 and 16x16 ones look like this:
Shield Windows XP 32x32Shield Windows XP 16x16

On Linux/Mono the icon contains the following 32x32 and 16x16 images:
Shield Linux/Mono 29x32Shield Linux/Mono 16x16

  Note

On Linux the .NET Core build mistakenly returns the SystemError icon, which is an issue in the SystemIcons implementation of .NET Core.

See Also