|
-
Apr 25th, 2012, 10:27 AM
#1
Thread Starter
Addicted Member
selecting a tab in a thread
I'm getting this error when try do a simple task of selecting a tab in a thread. What does it mean and how do you solve it?
System.Threading.ThreadStateException: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made.
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
Dim Thread1 As New System.Threading.Thread(AddressOf test_tab)
Thread1.Start()
End Sub
Private Sub test_tab()
TabControl1.SelectedTab = TabPage2
End Sub
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|