This example shows how to use ReplaceFormDefScannerSettings to modify the scanner settings of a form definition from a user-defined menu.
Important: Read the warning in ReplaceFormDefScannerSettings before using that method.
Export the form definitions from the old FORMS installation.
Install the new version of FORMS.
Using Manager, add this code to the AppStart event to add a user-defined menu:
Function OnAppStart () As Long
ret= ManagerApp.AddMenuItem (ehUserDefinedMenu2,
"FormDef.UpdateScannerSettings", 0, 1, 1)
OnAppStart = EV_OK ' Return value to FORMS
End Function
Add the corresponding VB code to modify the scanner settings:
‘Replacing form definitions scanner setting with current scanner settings"
Application.ReplaceFormDefScannerSettings()
OnAppUserDefined2 = EV_OK ' Return value to FORMS
End Function
Restart Manager.
Import the form definitions.
Modify the scanner settings to the desired values.
Modify each form definition using this procedure:
Open the form definition.
Select the user-defined command. The form definition’s scanner settings are replaced with the ones you defined in step 7 above.
Save the form definition.
Example of another way of doing the same thing
Exporting definitions and tables (FORMS Help topic)
Importing definitions and tables (FORMS Help topic)