后台工作线程错误

时间:2014-04-18 21:53:38

标签: wpf vb.net

我收到此错误:

The calling thread cannot access this object because a different thread owns it

在这部分代码中:

Private Sub loginWorker_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles loginworker.DoWork
        Try
            eFunctions._ValiAcc(My.Settings.adress, tbuser.Text, tbuser.Text & tbpwd.Password, eResult)
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Critical, "Error!")
        End Try
    End Sub

有人可以帮忙吗?

0 个答案:

没有答案