When you use bit fields with enumerated data types, you can use the elements in the Enum as flags. Now I know that you have to add the <Flags()> attribute to an Enum to turn this behaviour on, and there's no problems there, however, how do you find out the combination of values that has been set?
For example:
How do you get which buttons were passed so you can work on them?VB Code:
<Flags()> _ Enum myButtons [Next] = 1 Back = 2 Cancel = 4 '... End Enum Public Sub ShowButtons(buttons as myButtons) '...? End Sub '... 'Some other sub Call ShowButtons(myButtons.Next Or myButtons.Back)




Reply With Quote