Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dealing with memo field
Message
From
01/12/2003 22:09:02
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Dealing with memo field
Miscellaneous
Thread ID:
00854887
Message ID:
00854887
Views:
56
In our framework, the Escape key is launching the close sequence of the active form. All that works well. But, on the administration options of the application, soemtimes, the admin will double click on a memo field from a grid to open its content. At that level, if the Escape key is done, this will trigger an error as this is not interpreted as a _screen.ActiveForm.

This is what we have in the code to launch the closing sequence:
IF _screen.ActiveForm.QueryUnload()
   IF FormIsObject()
      _screen.ActiveForm.Release()
   ENDIF
ENDIF
How can I detect that I am in a memo field?

When I first try to enhance that part, I verified if _screen.ActiveForm was an object. Even at the memo field level, it is. So, that verification was not good. I then tried with the following:
IF NOT PEMSTATUS(_screen.ActiveForm,'QueryUnload',5)
   RETURN
ENDIF
So, from the memo field, this will be used. Now, I just need to find a way to have it closed. As it is now, it will simply return and do nothing. So, the memo field window will remain opened.

The entire code in the close sequence, which is triggered by the Escape key, is the following:
IF NOT PEMSTATUS(_screen.ActiveForm,'QueryUnload',5)
   RETURN
ENDIF

IF _screen.ActiveForm.QueryUnload()
   IF FormIsObject()
      _screen.ActiveForm.Release()
   ENDIF
ENDIF
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform