03-12-2012 05:38 PM
I am using a single line text box to display a string received from an instrument. Everything works fine in the debug mode. However, when I made the executable and loaded it on another computer, the received message flashes very quickly (to fast to actually read). Everything else works fine. How can I make the text box display more persistent?
Jim Rogers
03-13-2012 12:55 AM
A textbox, like any other control, actually IS a persistent method to display data: whatever you place in it will stay there until you explicitly clear or substitute it. Your problem must lie somewhere else in the program that operates in an unwanted manner.
I would double check whether your instrument returns a CR+LF to end messages and whether you have trimmed it away before actually displaying the message: such a terminator will cause the single-line textbox to shift away text from the visible part of it. You could also try displaying two lines on the control: if my hipothesis is correct you'll see the message in the first line.
BTW, remember that using SetCtrlVal on a textbox actually append new data to the old one: yìif you happen to retrieve textbox content you'll get a long string with all messages store in the time. Use ResetTextBox to replace existing content with new data.