title: InvalidOperationException was unhandled by user code Object is currently in use elsewhere .net
body: <p>I believe I've found a similar case with <a href="https://stackoverflow.com/questions/1851292/invalidoperationexception-object-is-currently-in-use-elsewhere">InvalidOperationException - object is currently in use elsewhere</a>; however, that is using c# where as I'm using .net, and I can't understand how to apply it to my program.</p>
  
  <p>My program is an attempt at making a basic replica of the arcade game space invaders, and to control their movement I use background workers. This is where the code usually gets the error:</p>
  
  <pre><code>If Invader4.Left &lt; Me.Width - 75 Then
      Invader4.Left += 3
      If Invader4.Tag = "OrangeSpaceInvader1" Then
          Invader4.Image = My.Resources.OrangeSpaceInvaderBlk2
          Invader4.Tag = "OrangeSpaceInvader2"
      ElseIf Invader4.Tag = "OrangeSpaceInvader2" Then
          Invader4.Image = My.Resources.OrangeSpaceInvaderBlk
          Invader4.Tag = "OrangeSpaceInvader1"
      End If
      Threading.Thread.Sleep(TimeSpan.FromSeconds(X))
  End If
  </code></pre>
  
  <p>This does not only occur for Invader4, as I've seen it pop up regarding Invader13, Invader2, and pretty much all of them. I have 16 in total, Invaders1-16. This specific piece of my code is in regard of moving them across the screen to the right. The line of code that the box containing the error is as the second line,</p>
  
  <pre><code>Invader4.Left += 3
  </code></pre>
  
  <p>I understand from reading answers on the other questions that multiple threads are trying to access the invader at once, although I'm not sure where in my program that is happening. The program can get this error immediately after I start the background workers controlling the movement of each invader, or when they are half way down, or anywhere in between or after.</p>