Hi Andy,
You don't really want to mix or link your tab enum and your state machine enum, because it makes it unnecessarily difficult to add a state without it showing up in the tabs.
I have attached a simple project which shows a queued state machine, and how you might use it with a tab control.
The UI handler at the top enqueues a state into the state machine, and the state machine itself can enquque further states.
The state machine is where most of your data processing tasks will be handled
A few states contain a simple local variable, to force the control to display a certain tab.
_____________________________
- Cheers, Ed