SegmentedControl - Value

I cannot believe that I am hitting this wall…

How in the heck do you programmtically set which segment is selected?
and
How do you determine which is selected

I have a simple two segment control… and need to set one or the other depending how the status of a value when they call the window with the control.
Then depending on which (if any) segment they click on I need to do different actions…

This should be like “duh simple”…

  Dim s As SegmentedControlItem = SegmentedControl1.Items(1)
  
  //see if the segment was selected
  flag=s.Selected

dim s as SegmentedControlItem = SegmentedControl1.Items(1)
s.Selected = true