This documentation is archived and is not being maintained.

VisualStyleRenderer.GetEnumValue Method

Returns the value of the specified enumerated type property for the current visual style element.

Namespace: System.Windows.Forms.VisualStyles
Assembly: System.Windows.Forms (in

Public Function GetEnumValue ( _
	prop As EnumProperty _
) As Integer
Dim instance As VisualStyleRenderer
Dim prop As EnumProperty
Dim returnValue As Integer

returnValue = instance.GetEnumValue(prop)
public int GetEnumValue (
	EnumProperty prop
public function GetEnumValue (
	prop : EnumProperty
) : int
Not applicable.



One of the EnumProperty values that specifies which property value to retrieve for the current visual style element.

Return Value

The integer value of the property specified by the prop parameter for the current visual style element.

Exception typeCondition


prop is not one of the EnumProperty values.

Visual styles use a set of enumerated types to describe some properties of the elements defined by a style. These enumerated types are encapsulated by the EnumProperty values.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0