How to automatically update temperature on the form load?
Expand Post »
Hai,
I'm read temperature data using MSComm..
The temperature was successfully display on vb6..but how can I update/automatically refresh the temperature on web according to current temperature?
could you kindly please help me over here? thks!
Below is my coding:
Re: How to automatically update temperature on the form load?
when i convert the code into vb.net2003, there was an error on do event() function..how to convert do event function in vb.net2003?
Do dummy = DoEvents()----this line was error
Loop Until MSComm1.InBufferCount >= 20
'print value in text box
Text1.Text = MSComm1.Input
Re: How to automatically update temperature on the form load?
hi,
thanks..it's working! I can display the temperature on my web application...but, how to automatically update temperature on the form load rather than manually clicking the refresh button?
Re: How to automatically update temperature on the form load?
What's the code on the refresh button? Currenlty i think you were getting the temp. on the form load also.
You can do this by using a timer control on the form and make the interval "1000" which will be equal to 1 sec. Make the Timer Control Enabled by default, and write the code to refresh temp. in the timer control.
Re: How to automatically update temperature on the form load?
You can put the same code in the form load on the timer control and it will only refresh the textbox control with the new values. It will not load the form again but yes it redraws the form window. If its a web application you can update a particular without loading the whole page using AJAX.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline:move frame