I am trying to display a msgbox and for the user to select yes or no. I am being passed a DataTableMessage where I use the 3 row values in the msgbox. I get the error "The calling thread must be STA, because many UI components require this."
I am using vb.net and WFP. My code where this error is happening is as follows:
If MsgBox("Message Text Here"
, MsgBoxStyle.YesNo, "Caption Here") = MsgBoxResult.No
Then 'Do something
Else
'Do Something
End If