Page History
...
See Also
Example
Code Block |
---|
* The following code snippet handles the turning off of the SAVEWARN message during the * CLOSE event of the window. This code should be placed into the CLOSE Event Handler. declare function Set_Property, Get_Property, Send_Event * determine which control has focus GotFocus_Control = Get_Property(@window,"GOTFOCUS_CONTROL") * force the matching of the GOTFOCUS and DEFPROP properties on the control which has focus x = Send_Event(GotFocus_Control,"GOTFOCUS") * Turn the SAVEWARN message off x = Set_Property(@window,"SAVEWARN",0) |
Note from Anonymous User
Note |
---|
I found that this example code will not work when to current control with focus is an OLE control. A workaround that I came up with was to add the following line after getting the GOTFOCUS_CONTROL: Set_Property( GotFocus_Control, "FOCUS", 1) |