accessing serial port on multiple forms in vb.net

206 views Asked by At

I have created a project having 98 forms. It's a GUI which controls operations of relays (switch on and off) for which i have used checkbox. I'm using serial communication for one form, is it possible i can use the same for multiple forms?

1

There are 1 answers

0
Aaditya Dengle On

Surely you can, Just make the serial communication object public and use it in any form. Additionally I will suggest you to move the Serial communication object to a singleton class and initiate that class while starting your program.