[Gambas-user] Problem with Lock method for DrawingArea class

John Rose john.aaron.rose at gmail.com
Fri Jun 5 18:22:39 CEST 2020


This problem is difficult to explain, so please bear with me. The idea 
behind my app is to allow the user to select a Desktop Window. This is 
done by having the FSelectWindow form overlay (with Opacity=35, 
Arrangement=Vertical) the available desktop. The Select_Window form 
contains only one control (DrawingAreaDesktop with Expand=True). This 
results in the Drawing AreaDesktop forming a semi-opaque layer over the 
available desktop.

If before you run my app, you close all windows except Gambas (but not 
full screen) and Compile All, there are no compilation errors or 
warnings. Then run my app and click on the Select button (in the FMain 
form), you will see that all the desktop windows (i.e. only the Gambas 
one) are shown in a semi-opaque 'mode'. If you now click on a point in 
an empty area, a Message Box will be displayed saying "Try again:" & 
"Did not click on window.": caused by lines 106-107 of Sub 
DrawingAreaDesktop_MouseUp() event. If you click on the Ok button, then 
(with the Lock command in line 104 commented out) the Mouse_Up event is 
entered again: this is shown by examining the Console output. To prevent 
(re-)entry to the Mouse_Up event coding when the user clicks the Message 
Box Ok button, I tried to use the Lock method in line 104 to prevent 
this (re-)entry. However, I then get an error window saying "Unknown 
symbol in 'Lock' in class 'Drawing Area' at 
FSelectWindow.DrawingAreaDesktop - MouseUp.104 (generated by line 135) .

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200605/6bcce727/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SelectWindow.tar.gz
Type: application/gzip
Size: 18924 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200605/6bcce727/attachment-0001.gz>


More information about the User mailing list