The New Form Program

This program opens a new form of the same class.

The similar programm which is found here: http://www.theeasygambasdoku.de/widgets/form/form/index.html does not work in my Gambas version.

You need 2 command buttons to get the program going. The new form does not differ from the main Form.

The Code:

    Fmain AS Class

    STATIC PUBLIC SUB Main()
      DIM hForm AS Fmain
      hForm = NEW Fmain
      hForm.show
    END

    PUBLIC SUB Button1_Click()
      DIM hNewForm AS Fmain
      hNewForm = NEW Fmain
      hNewForm.show
    END

    PUBLIC SUB Button2_Click()
    ME.close
    END

-- ReinerHoffmann - 10 Sep 2004