RobotStudio event

opening new forms

Options
Hello, does anybody know how to open a new form, and close that form after a button is pressed? Thanks

Comments

  • RussD
    Options

    A new form will be a new class instance, and these classes will typically inherit from GTPUMasterDialog. You would do something like the following in your button's click event handler, where "myClass" is your GTPUMasterDialog-based form class:

    Dim myClassInstance as myClass


    If
    myClassInstance Is Nothing Then
    myClassInstance =
    New myClass
    End If
    myClassInstance.ShowMe(
    Me)

    You can then enable the CancelItem on the MainMenu of your GTPUMasterDialog-based form and press that to close the form.

    RussD38737,5321759259
    Russell Drown
  • RussD
    Options

    Please refer to the folowing topic for a sample application:

    http://forums.robotstudio.com/forum_posts.asp?TID=636&PN=1&TPN=1

    RussD38741,9658449074
    Russell Drown
  • Subforms have to inherit from GTPUMasterDialog.  When loading the dll's into the system folder don't include the gtpu.dll for the sub form.  Use the ShowMe(this) method to invoke the subform in its parent form.  (in c#)