Once you have finished making the desired changes to the form, you should save it to disk. If you want to retain the original form (calculateAge.xfd), you should save the modified form under a new name. This program saves the modified form as Output.xfd.
The following example implements the function SaveForm. This function calls the API function WriteForm that writes a form to disk.
' Call theForm.writeForm. theForm is the root node of the form to
' be written. The parameters are:
' 1. output.xfd : the filename you want to use (you could also use
' a path here).
' 2. Nothing : since we do not want to set a triggeritem.
' 3. 0 : since we do not want to allow the transmit options to work.
' An exception is thrown if there is a problem.
TheForm.WriteForm "output.xfd", Nothing, 0
Parent topic: Developing an application in Visual Basic