Community articleSetting Up Your Application
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

This example assumes that you are developing a program in Microsoft® Visual Basic using Microsoft Studio. To begin, you must first set up your development environment to use the API type library.
  1. Create a new Visual Basic project.
  2. Any project using the API must include the following type library:
    • IFS_COM_API.tlb
    • To add this to your Visual Basic Project, open the References ; dialog from the Project menu and select “InternetForms API”.
  3. Set up the rest of your application. This generally includes setting up your main algorithm and declaring any variables you will need. The following code sets up the Calculate Age application:
  4.    ' Create the Main method for the program.
       Sub Main()
          ' Declare a number of variables. TheForm represents the form, while the
          ' other variables are values we will read from the form.
          Dim TheForm As IFormNodeP
          Dim BirthYear As Integer
          Dim BirthMonth As Integer
          Dim BirthDay As Integer
          ' The program's Main consists of a number of calls to other functions.
          Set TheForm = LoadForm
          BirthYear = GetBirthYear(TheForm)
          BirthMonth = GetBirthMonth(TheForm)
          BirthDay = GetBirthDay(TheForm)
          SetBirthYear BirthYear, TheForm
          SetBirthMonth BirthMonth, TheForm
          SetBirthDay BirthDay, TheForm
          SaveForm TheForm
          ' Free the memory in which the form was stored.
       End Sub

Parent topic: Developing an application in Visual Basic