This topic has not yet been rated - Rate this topic

_GETEXPR System Variable

Specifies the program that is executed when you issue the GETEXPR command or invoke the Expression Builder dialog box from within Visual FoxPro.


_GETEXPR = ProgramName

Parameters

ProgramName

Specifies a program that is executed when you issue the GETEXPR command or invoke the Expression Builder dialog box from within Visual FoxPro. If your program is in a directory other than the current default directory, include a path with the program name.

_GETEXPR contains the empty string by default; the empty string indicates that the standard Visual FoxPro Expression Builder dialog box is displayed when the GETEXPR command is executed or when you invoke the Expression Builder dialog box from within Visual FoxPro.

You can create your own Expression Builder program that is executed when the GETEXPR command is executed or when you invoke the Expression Builder dialog box from within Visual FoxPro. Your Expression Builder program must contain an LPARAMETERS or PARAMETERS statement as the first executable line of the program to accept four parameters that Visual FoxPro passes to the program. The parameters are listed below in the order they are passed:

Parameter Description

cExpressionType

Specifies the expression type.

cErrorMessageText

Specifies the error message displayed if the expression isn't valid.

cDefaultExpression

Specifies the initial default expression in the Expression Builder.

cCaptionText

Specifies the caption that appears in the Expression Builder.

For example, the following could be the first executable line of your Expression Builder program:

LPARAMETERS cExpressionType, cErrorMessageText, ;
   cDefaultExpression, cCaptionText

If your Expression Builder program is executed when the Expression Builder dialog box is invoked from within Visual FoxPro, the first three parameters contain the empty string and the fourth parameter contains cCaptionText, the caption that appears in the Expression Builder.

Note that the Visual FoxPro Expression Builder is a modal dialog. Your Expression Builder program should set its form properties to the following values to create a modal dialog:

Form property Property value

AlwaysOnTop

True (.T.)

Desktop

True (.T.)

WindowType

1 – Modal

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.