How to Return a Value from a FormLast reviewed: April 30, 1996Article ID: Q126956 |
The information in this article applies to:
SUMMARYThis article describes a way to obtain a return value from a Form called with a DO FORM command.
MORE INFORMATIONSome operations require a return value from a Form. For example, a dialog box typically returns an answer from user input. The DO FORM command is used to instantiate a form designed with the Form Designer. The TO clause of the DO FORM command allows to specify a return variable. For example:
DO FORM frmtest1 TO cOkvarThis statement returns a value to the cOkvar variable if a RETURN statement is placed in the Unload method of a Form and the form is modal (WindowType=1-Modal). For more information about the DO FORM command, search using DO FORM in the FoxPro Help system. For information on calling a form as if it were a function, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q129648 TITLE : Calling a Form as If It Were a Function to Return a ValueThe following step-by-step example illustrates how you can use a property to hold the return value of a form.
Step-by-Step Example
|
Additional reference words: VFoxWin 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |