[Gambas-user] How to use MessageView when closing a form?
Benoît Minisini
g4mba5 at gmail.com
Thu Aug 26 20:32:15 CEST 2021
Le 26/08/2021 à 19:21, Bruce Steers a écrit :
> Use mvwOutpit_Close() event to close form?
>
>
> On Thu, 26 Aug 2021, 18:09 bb, <adamnt42 at gmail.com
> <mailto:adamnt42 at gmail.com>> wrote:
>
> (Internal #614)
>
> We are trying to show a MessageView when the user clicks on a button
> that closes the form or presses ESC. So in btnCancel_Click() we have
>
> Public Sub btnCancel_Click()
>
> Action["Exit"].Enabled = False
> mvwOutput.Open("Search abandoned", Picture["icon:/32/emote-sad"])
>
> While mvwOutput.Visible
> Wait 0.1
> Wend
>
> Me.Close
>
> End
>
> which works, but seems a terrible waste of electrons (top shows it
> using 7% CPU).
>
> Anyone got a better idea?
>
> tia
> bruce (&Caarol, Joe and Fels)
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette
> <http://gambaswiki.org/wiki/doc/netiquette> ]----
>
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
As soon as you are calling WAIT inside a loop in a graphical
application, there is a 99% chance that you are doing something wrong.
--
Benoît Minisini
More information about the User
mailing list