How i know that a window was closed by X?

how i know that a window was closed by X in a movable modal window?
because if the ui is not there i can not use a computed property to read from a textbox.

has close button = True
Implicit Instance = False

Var w As New WindowXY
w.ShowModal

if ??? then

end if

Closed by X as opposed to?
Or closed at all?

For the later, your code will just continue.

You can grab values from controls on the window by storing them in properties before the window is closed.

Check out the example for “Show Window Dialog” as it shows how to stash the value from a control and read it after ShowModal:

Example Projects/Desktop/Dialog Boxes/DialogsExample.xojo_binary_project` 
1 Like

Or overload ShowModal with a function that returns a meaningful value.

1 Like

thanks, i choose the way via property