<div dir="ltr"><div>I don't quite understand what exactly you need. But see the attached project, maybe that is close enough?</div><div><br></div><div><br></div><div>Jussi<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 18, 2019 at 10:38 PM Marco Ancillotti <<a href="mailto:gambas@servinfo.it">gambas@servinfo.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
Ok , I have a wait in the component an cannot change to sleep, I will <br>
post the code tomorrow when have time to minimize and separate the problem.<br>
<br>
As a note I can't use any popup ( my program works on remote x2go <br>
session from windows and some users hide popup and don't know how to <br>
exit program ) so I write a component that work the same as <br>
message.question but open inside main form.<br>
<br>
The component have a open event that return what button have been pressed.<br>
To make the open event return right data after button click I put in the <br>
end somethink like:<br>
<br>
   While $bclick = False<br>
     Try Wait 0.1<br>
     Try IsNull(Me.window)<br>
     If Error Then $bclick = True<br>
   Wend<br>
   Return $retvalue<br>
<br>
The $retvalue and $bclick are changed by button pressed inside the <br>
component.<br>
This is the only way I found to make it work , is there another way ?<br>
Using that logic I need the wait to make the open event wait for button <br>
click.<br>
<br>
Thank's,<br>
marco.<br>
<br>
<br>
Il 18/01/19 21:12, Benoît Minisini ha scritto:<br>
> Le 18/01/2019 à 21:01, Jussi Lahtinen a écrit :<br>
>> The apri function has Wait command inside it? That is not allowed, <br>
>> because wait calls the event loop. Use Sleep (or timer) instead.<br>
>><br>
>><br>
>> Jussi<br>
>><br>
><br>
> Yes. And without seeing the actual code, we have to write ton of mails <br>
> to guess...<br>
><br>
<br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div>