I am working on a application that uses a piece of hardware that is connected through a COM port. The hardware came with some sample code in VB.net .After it reads the data from the com port it calls a sub that is on the same form using
Me.Invoke(New EventHandler(AddressOf MySub))
My question is why would I call the sub this way instead of just
I have never used invoke before so I'm not quite sure how it would fit in with this. From my research I see it has something to do with multithreading. It seems to work, I would just like to understand it better why it was called this way.