Zajedno sa Form1 startuje se i thread koji skenira seriski port (eButton)
Na Button u Form1 staruje se Form2 koja je povezana sa sql bazom
Sada mi treba da broj koji sam dobio u thread-u od eButton prebacim u jedan TextBox u Form2, medjutim to ne radi nikako ako se pokrece iz thread-a.
Koristim invoke tj:
Public Delegate Sub SetControlTextInvoker(ByVal ctl As Control, ByVal text As String)
Public Sub SetControlText(ByVal ctl As Control, ByVal text As String)
If ctl.InvokeRequired Then
ctl.Invoke(New SetControlTextInvoker(AddressOf SetControlText), ctl, text)
Else
ctl.Text = text
End If
End Sub
Poz svima i unapred hvala