H
Hayato Iriumi
It's a big taboo to manipulate Windows Form directly from another thread
and I did come across the issue in my actual development. My colleague and
I were talking about it this morning and we wanted to see if we could actually
get the exception to happen. So I did this sample in VB .NET.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Dim t As New Thread(AddressOf Me.MyThreadSub)
t.Start()
End Sub
Private Sub MyThreadSub()
Button1.Text = "Test"
End Sub
Somehow, error is not happening... Now I'm confused..
and I did come across the issue in my actual development. My colleague and
I were talking about it this morning and we wanted to see if we could actually
get the exception to happen. So I did this sample in VB .NET.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Dim t As New Thread(AddressOf Me.MyThreadSub)
t.Start()
End Sub
Private Sub MyThreadSub()
Button1.Text = "Test"
End Sub
Somehow, error is not happening... Now I'm confused..