Reputation: 3
In vb.net 2019, I have a form - 'form1' - that displays 'form2' (form2.Show()). form1 has the Systems.IO.Ports.SerialPort component added to it. How would I code form2 to 'handle' a serial port data receive event on form1?
Upvotes: 0
Views: 181
Reputation: 81
Why not handle the event on Form1 where the control exists?
For example:
Sub SerialPortDataReceiveEvent(DataReceiveObject) Form2.SomeProperty = DataReceiveObject.WantedProperty End Sub
Upvotes: 1