Quantcast
Channel: cross-thread UI updating?
Viewing all articles
Browse latest Browse all 12

cross-thread UI updating?

$
0
0
thanks. i checked out that entry on my local SDK, but it was pretty bare.

can you show me an example of what you mean w/ a bit more detail? for instance, i have:

SomeForm.vb
--------------

'bad, because GetMyData() is binding its data (from a thread) back to the UI:

Private Sub SomeForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

   Private m_getDataThread As Thread
    ...
   m_getDataThread = New Thread(AddressOf GetMyData)

   If Not m_getDashboardDataThread.ThreadState =
Threading.ThreadState.Running Then
          m_getDataThread .IsBackground = True
          m_getDataThread .Start()
   End If

End Sub


...but then what? where do i place the .Invoke, and how does that tie back into the data object my thread-method retrieves?


thanks,
matt

Viewing all articles
Browse latest Browse all 12

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>