Hello, i notice that events "OnImage" and "OnUpdate" are not triggered if a MsgBox is used right after RHistoryQuery.Subscribe. Did you know about this issue ? How can i solve this problem ?
RHistory API gets the data asynchronously, so if you block the execution of the current thread with the MsgBox, the fired event will be missed. I think you will see same behaviour with any async API.
I suggest either queuing the 'Subscribe' call after the MsgBox call, or refrain from using MsgBox at all.
To add to the answer by @Zhenya Kovalyov, as an alternative to VBA message box, which is modal and which blocks the execution thread, you can use Win API message box where you can control the modality. Attached is a quick example.nonmodalmessagebox.zip
Hello thanks both for your answers.
I found an other alternative -> I set the request frequency to 1 seconde.
The event OnUpdate will be trigerred every 1 seconde. So, even if a MsgBox block the execution, the event will still be called right after the end of the MsgBox.
To avoid multiple execution, i also cancel the request in the event OnUpdate.