Loading one form from another

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bhasky12345
    New Member
    • Jan 2013
    • 3

    Loading one form from another

    Hi All,

    I am creating one application with 2 forms. Step1 is the first form and Step2 is the second one. I can load the second form from the first one. How do I create an instance of the first form and call it from the second form? I dont want to load the first form afresh, instead, I want to load the last instance of the first form (from the second form, may be using a Back button) where user would already have filled in some data and navigated to the second form.
    I can create an instance of the first form as
    Code:
    DIM F1 As Step1
    But I dont seem to have been able to use
    Code:
    F1.show()
    from the second form.
    Hope my requirement is clear to you.
    I am sorry, I am quite new to VB.NET. Please help.
  • IronRazer
    New Member
    • Jan 2013
    • 83

    #2
    Hey bhasky12345,
    When you are done with the Step1 form and want to go to the Step2 form you can do this :
    Code:
    Step1.Hide
    Step2.show
    Now if you want to go back to Step1 you can use :
    Code:
    Step2.Hide
    Step1.Show
    The forms should keep all settings and/or info until you close the forms. I hope this helps.

    Comment

    Working...