Hello,
I have an application that shows the user the serial ports available on a PC and allows him to select several of them and configure their parameters (speed, data bits, parity). That is done on a Form different from the main form called frmSetup.
When the user is done selecting the serial ports and selecting their parameters, the application closes the frmSetup and goes to the main form where the user sends and receives information on the selected serial ports.
My confusion is where should I add the serial port objects (and also private ? public ?), so they can be seen by the 2 forms (frmMain and frmSetup).
I'm adding the serial ports by code, not by dragging the control from the toolbox because I don't know how many serial ports the user is going to choose, so I was wondering where to put the code that generates n serial port objects (n = number of serial ports choosen by the user).
BTW: I'm using Visual Studio 2005
Regards,
Carlos
I have an application that shows the user the serial ports available on a PC and allows him to select several of them and configure their parameters (speed, data bits, parity). That is done on a Form different from the main form called frmSetup.
When the user is done selecting the serial ports and selecting their parameters, the application closes the frmSetup and goes to the main form where the user sends and receives information on the selected serial ports.
My confusion is where should I add the serial port objects (and also private ? public ?), so they can be seen by the 2 forms (frmMain and frmSetup).
I'm adding the serial ports by code, not by dragging the control from the toolbox because I don't know how many serial ports the user is going to choose, so I was wondering where to put the code that generates n serial port objects (n = number of serial ports choosen by the user).
BTW: I'm using Visual Studio 2005
Regards,
Carlos