setting the displayed value of a variable so the displayed value is always the current value?
Posted on 2006-11-30
I've got a stream of data coming in via a modbus app. The piece of data of interest is deposited in a variable of type 'long' named 'Setpoint' (for example). Now, this variable Setpoint may change with the incoming modbus value BUT it may also change elsewhere in the VB program depending on various events and settings. (this is obviously very simplified).
How do I set up a text box to always display the -current- value of Setpoint, no matter what it is, no matter where it's changed, no matter when it's changed?
Presumably it's a text box..if not, what should I be using?
One way is to go every single place that Setpoint may be affected, and put Text15.Text = Setpoint after it, but there's gotta be a better way.