Using MessageBox.Show() without suspending execution

Created at 15 Apr 2024, 12:46
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
NC

ncel01

Joined 19.03.2020

Using MessageBox.Show() without suspending execution
15 Apr 2024, 12:46


Hello,

Is there a way to use cAlgo.API.MessageBox without suspending the execution?
I've noticed that execution is suspended, even if no result from the message box is required by the code.

This can easily turn into an issue considering that trading events ( OnTick(), OnBar(), etc..) keep on being triggered.

Thanks!


@ncel01
Replies

PanagiotisCharalampous
16 Apr 2024, 05:41

Hi ncel01,

No the form is modal. You would need you use your own solution to avoid this.

Best regards,

Panagiotis


@PanagiotisCharalampous

ncel01
17 Apr 2024, 12:10

RE: Using MessageBox.Show() without suspending execution

PanagiotisCharalampous said: 

Hi ncel01,

No the form is modal. You would need you use your own solution to avoid this.

Best regards,

Panagiotis

Hi Panagiotis,

I see.

Unfortunately, I am afraid that the only solution is then to suspend any events until the message box is checked.


@ncel01