I opened several posts two days ago to explain and solve my problem. I noticed that I got on a complicated road and I changed my way.
I have created a program for serial communication between one and more objects through commands.
I have this setting here:
- I have a main window for choosing the COM, 4 text area to fill them in with the address of the device I want to communicate and next to them, I have 4 buttons to open a new page for each device.
- When I choose a device, a dedicated window opens where I have 4 buttons to send ON / OFF and a screen that I receive the command.
My question is this: instead of using methods, I am using a Serial object for each window. How can I set the choice of COM only in the main window and not in the secondary windows?