I have an MdiParent form that opens serial port (COM1). I have a child form, that starts a timer on a click of a button, and the timer fires every couple of seconds. The timer calls a method in a separate class (lets call it commClass) that is suppose to read and write to previously opened COM1 port.
Communication between Mdi and COM1 works fine. So does the timer, triggering events. The problem is the writing/reading from the serial port.
Can someone please tell me a proper OOP way to access my serial port, defined on Mdi form, from my commClass? A few lines of code that explains what to do on Mdi, child and commClass would be greatly appreciated.
Thanks!