I am working on a console app that polls devices on a serial port. In addition to the DoEvents in the Run Event
While StayAlive = True
Doevents
wend
I am wondering if I need to add App.DoEvents when in a loose loop? I am pretty sure the answer is no, especially when I am using Timers as part of the app. Basically during the execution of a do loop within the app, I start certain timers. I want to be sure they will go off at roughly the time they should (usually 500mS intervals).
Tim - keep in mind that there’s what “Should” work and then there’s Linux and what DOES work.
Linux loops can be so tight that a console app will not update the stdout stream until the end of the loop or app exit without calling App.DoEvents(5). If you are expecting ANY I/O in that while loop on Linux, you really do want to add the App.DoEvents().