Cross-thread operation not valid: Control 'hiddenrtb2' accessed from a thread other t

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mankeluvsit
    New Member
    • Mar 2010
    • 3

    Cross-thread operation not valid: Control 'hiddenrtb2' accessed from a thread other t

    im getting this error and i cant figure it out.

    Code:
        Public Sub mlogin()
            Invoke(chkb, New Object() {"disable"})
            Invoke(d, New Object() {achidrtb, "", "="})
            Invoke(d, New Object() {hiddenrtb2, "", "="})
            Invoke(d, New Object() {resultrtb, "", "="})
            Invoke(d, New Object() {successes, "0", "="})
            Invoke(d, New Object() {fails, "0", "="})
            Invoke(d, New Object() {checkednum, "0", "="})
            allowcheck = True
            Dim linenum As Integer = 1
            Dim accchk As String
            Dim SErr As New TSteamError()
            Dim iSteamReturn As Integer = 0
            Dim isLoggedIn As Integer = 0
            Dim sHandle As System.UInt32
            Dim startoptions As System.UInt32 = 15
            iSteamReturn = SteamStartEngine(SErr)
            iSteamReturn = SteamIsLoggedIn(isLoggedIn, SErr)
            iSteamReturn = SteamStartup(startoptions, SErr)
            Dim TProgress As New TSteamProgress()
            TProgress.Valid = 1
            i = 0
            Invoke(mul, New Object() {"x"})
            Invoke(d, New Object() {hiddenrtb2, mu, "="})
            Dim numlines As Integer = 0
    
            Dim List As String() = hiddenrtb2.Lines
            Dim Line As String
            For Each Line In List
                numlines = numlines + 1
            Next Line
            Invoke(d, New Object() {acclistnum, numlines.ToString(), "="})
            While numlines > 0
                Dim line2 As String
                line2 = hiddenrtb2.Lines(linenum - 1)
                numlines = numlines - 1
                linenum = linenum + 1
    any help would be appreciated.
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    Cross-thread operation not valid: Control 'hiddenrtb2' accessed from a thread other thread
    im getting this error and i cant figure it out.
    It means that you made a control (hiddenrtb2) on one thread, but are trying to affect it from a different thread. That's not generally allowed.

    If you want to access that control, you have to do it from the same thread that created it.

    Comment

    Working...