Possible Duplicate:
Best way to access a control on another form in WinForms?
how can I access serialPort1 which is in form2 in the MainForm(Form1) ? I want to use the methods which is related to the serialPort1 control ?
Possible Duplicate:
Best way to access a control on another form in WinForms?
how can I access serialPort1 which is in form2 in the MainForm(Form1) ? I want to use the methods which is related to the serialPort1 control ?
Store your SerialPort
object in a static location, like in your entrypoint Program
class, then it's accessible from anywhere in your project during the life of your program.
Also consider giving your fields more descriptive names than "serialPort1
".