My app's external processes each poll a boolean to see if there is work to do. I now want to check that variable in a Timer
event to cut down the 'not responding' messages.
A Timer object has to be placed on a form, which seems to cause some limitations.
Launching the event from a form with Me.Show
(vbModal
) works great. Only I don't want to actually show that form, I just want to use the timer. Trying to hide the form using Me.Hide
then loses the Modal behavior which I need, so that's not a good workaround.
I tried launching the event from a class but it exhibits the same unwanted behavior as Me.Hide
: Processing returns to the caller rather than staying in the timer event sub waiting for work.
Is there any way to implement an event based on Timer
which doesn't require showing a form and does not immediately return to the caller? The external processes have no screen IO and none is desired.