cant link a textbox value to a progressbar value, need loop code
Posted on 2000-03-13
I have an app that connects to a com port and displays the temperature through a label control and a textbox control, I also have a Mabry indicator control that is coded to show the value of this textbox ( very similar to a progressbar). Currently, the only way to see the gauge work is a button I made called "poll" which executes the code that syncs the text1 value with the gauge...If it is pressed before data is in the text1 box, an error is generated. What I want, is after the com port is connected, for the poll gauge code to run and loop to update the gauge every so often so that it is a visual represention of the number value in the textbox. So what I need is the poll button to be "pressed automatically" and for it to loop endlessly about every 15-30 seconds, BUT ONLY after com1 is connected and there is a value in the textbox. Could someone show me the code for this? I think it is basically a loop with a few conditions. But I have tried a few things and am getting nowhere.