Pass Parameters Between Forms Sample
Visual FoxPro 9.0 SP2 |
Pass Parameters Between Forms Sample |
See Also |
File: ...\Samples\Solution\Forms\Param.scx
This solution illustrates passing parameters to a form and returning a value back.
PARAM Form
This form has the user enter a question and possible responses. Then, in the Click event of the cmdAsk button, the ParamAsk form is opened by passing the Question and Possible responses.
![]() | |
---|---|
cParam1 = THISFORM.txtPassValue1.value nParam2 = THISFORM.opgPassValue2.value DO FORM LOCFILE("ParamAsk.scx") WITH cParam1, nParam2 TO nRetValue |
PARAMASK Form
The PARAMETERS are passed to the Init of the form where they are processed.
![]() | |
---|---|
PARAMETERS cQuestion, nButtons THISFORM.txtQuestion.caption = cQuestion |
In the Unload event of the form, the value stored in retvalue is returned back to the calling form:
![]() | |
---|---|
RETURN THISFORM.retValue |
See Also
Tasks
Solution SamplesReference
Visual FoxPro Foundation Classes A-ZOther Resources
Forms Solution Samples© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic