Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Im building a form that has multiple ones.
The idea is to only connect in the first form
to serial port. When click a button it shows
up another form. In this there are many buttons
that send data through serial port.
I cant made the link between this forms

What I have tried:

Im new at this, so I dont have any idea of what to try. I cant find much info about this situation
Posted
Updated 19-Aug-19 9:34am

1 solution

Make a static class with your serial communication code that you can access from any form.
See example here: Static Classes and Static Class Members - C# Programming Guide | Microsoft Docs[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900