Note that VFP Intellisense (if available) can also furnish this value to you directly as a numeric value which is more efficient. But this only works if the type is registered for COM Interop (most are not) and when you have it referenced explicitly in your code as the COM type using a LOCAL declaration.
o.GetEnumValue(lcType, lcValue)
If lcValue is not passed the type is assumed to be the full Enum type name including the enumeration property name.
(System.Windows.Forms.MessageBoxIcon.Exclamation)
lcValue
The enum value as a string.
? loBridge.GetEnumValue("System.Windows.Forms.MessageBoxDefaultButton.Button2") && 256 *** Slightly more efficient - treated like a pure static loBridge.GetEnumValue("System.Windows.Forms.MessageBoxDefaultButton","Button3") && 512