Community articleWriting a Form to Disk
Added by IBM contributorIBM on May 6, 2011
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

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.

   Sub SaveForm(TheForm)
      ' 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
   End Sub

Parent topic: Developing an application in Visual Basic