vbnino
Messages postés218Date d'inscriptionjeudi 13 juillet 2006StatutMembreDernière intervention11 juillet 2010
-
9 sept. 2008 à 15:00
NHenry
Messages postés15113Date d'inscriptionvendredi 14 mars 2003StatutModérateurDernière intervention22 avril 2024
-
10 sept. 2008 à 14:42
Salut!
-J'ai dans ma Class Form1 ce code :
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
Dim Ths As System.Threading.ThreadStart = New System.Threading.ThreadStart(AddressOfsearch)
Dim Th As System.Threading.Thread = New System.Threading.Thread(Ths)
Th.Priority = System.Threading.ThreadPriority.BelowNormal
Th.IsBackground = True
Th.Start()
Do
Th.Join(1)
Application.DoEvents()
Loop Until Not Th.IsAlive
end sub
Le probléme c'est que quand je clique sur le button il me renvoi une erreur :
Cross-Thread operation not valid : Control 'rep' accessed from a thread other than
the thread it was created on