|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: Tuesday, April 15, 2008 4:33 PM
Posts: 1,
Visits: 5
|
|
Hello, I am writing a C# Windows Application, not a console application. I need to know how to add the temperature sensor output to a textbox located within the application:
static void tempSensor_TemperatureChanged(SerializerComponent sender)
{
textbox1.Text = "Temp: {0}" + tempSensor.Temperature;
}
Because it is static, I can't seem to figure out how to access the textbox1 to update it with the correct information. Can anyone please help me figure this out. I am fairly new to C# so any help will do. I can show more of the code if needed. Thanks.
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: Monday, December 01, 2008 6:34 PM
Posts: 299,
Visits: 426
|
|
| You can use: textbox1.Text = tempSensor.Temperature.ToString(); Best Regards!
Jason Summerour President, Summerour Robotics Corporation Microsoft MVP www.roboticsconnection.com
|
|
|
|