Hi, I am using a sub to handle the enabling/disabling of buttons on a form based on the Enum value provided as a parameter.
For example my Enum looks like this:
Then in my sub I would use:
If I wanted to change the state of multiple groups of buttons would I be able to use the 'Or' or 'And' keyword? If so how would I go about this? I realise I can call the procedure more than once with the relevant argument but the problem I face is when I need to disable all the buttons while performing certain functions and then restore all of the button states back to how they were afterwards.
Thanks
Jay
For example my Enum looks like this:
VB.NET Code:
Enum ButtonState EnableAll DisableAll EnableClipboard DisableClipboard EnableColouring DisableColouring End Enum
VB.NET Code:
Public Sub SetButtonState(ByVal State As ButtonState) Select Case State Case ButtonState.EnableAll 'Enable Buttons Case ButtonState.DisableAll 'Disable Buttons 'etc End Select End Sub
Thanks
Jay