G
Guest
I'm a newbie that is still struggling with OOP concepts & how to make things
work they way I want. Using Visual C# Express, I have a form in which I added
a user control to display a graph, based upon data received via the serial
port. If I run the serial port in the main form code, I can get data and,
using public properties of the user control, transfer the data to be shown on
the graph. However, I am trying to add a feature that will poll the external
device via the serial port and update the graph within the user control.
However, when I try to add a serial port command (such as
serialPort1.WriteLine()) within the user control code I get an error:
"The name 'serialPort1' does not exist in the current context"
How do I make the serial port control "visible" to my user control?
Thanks,
Dave T.
work they way I want. Using Visual C# Express, I have a form in which I added
a user control to display a graph, based upon data received via the serial
port. If I run the serial port in the main form code, I can get data and,
using public properties of the user control, transfer the data to be shown on
the graph. However, I am trying to add a feature that will poll the external
device via the serial port and update the graph within the user control.
However, when I try to add a serial port command (such as
serialPort1.WriteLine()) within the user control code I get an error:
"The name 'serialPort1' does not exist in the current context"
How do I make the serial port control "visible" to my user control?
Thanks,
Dave T.