Message Box
Quote from kabilesh cobra on April 14, 2022, 2:02 pmAfter some experimentation we found that the 'Last' is not changed by the 'Message Box' so you don't need the 'Lock' anyway, try the code below. If you did need to store the 'Last' just create a variable to store it in.
(As mentioned before the window below is created with the 'gb' button not the '</>' code button)Public Sub Button1_Click()
Message.Info("Did not click on window.")
Print Last.nameEnd
The 'DrawingArea1_MouseUp' routine will not get called again as the MessageBox is not the 'DrawingArea'.
There is a 'Break' in your code that is not inside a loop. This generates an error.
I noticed this 'aWindow = []' code. You don't need this, if you set up your Array with Dim aWindow as New Window it will be set up as a Dynamic array.
After some experimentation we found that the 'Last' is not changed by the 'Message Box' so you don't need the 'Lock' anyway, try the code below. If you did need to store the 'Last' just create a variable to store it in.
(As mentioned before the window below is created with the 'gb' button not the '</>' code button)
Public Sub Button1_Click()
Message.Info("Did not click on window.")
Print Last.nameEnd
The 'DrawingArea1_MouseUp' routine will not get called again as the MessageBox is not the 'DrawingArea'.
There is a 'Break' in your code that is not inside a loop. This generates an error.
I noticed this 'aWindow = []' code. You don't need this, if you set up your Array with Dim aWindow as New Window it will be set up as a Dynamic array.