* runs a form from main EXE module. Usage: * Result = RunForm("{Form Name}", "{Parameters}", {.T. or .F., when .T. - form returns result}) * parameters are comma-separated parameters in form of string. Do not pass local variables * there - convert them to constants. procedure RunForm lparameters pcForm, pcParams, plRetVal local lcAddOns, llResult m.llResult = .T. if vartype(m.pcParams) == "C" AND !empty(m.pcParams) lcAddOns = "WITH " + m.pcParams endif if m.plRetVal lcAddOns = "TO llResult" endif DO FORM (m.pcForm) &lcAddOns return m.llResult endprocIn the VCX file use this procedure to run form from toolbar, when form in compiled into the EXE. The RunForm procedure should be loaded into the memory and should be part of the EXE (compiled into the EXE). To make it loaded in memory, put it in the main (startup) program that contains READ EVENTS, or just put it in the PRG file and use SET PROCEDURE ... ADDITIVE command to load it into memory.
>DO FROM someform WITH param TO retVal >>