Author Topic: Form change clear mainform  (Read 1492 times)

KariM

  • Newbie
  • *
  • Posts: 33
    • View Profile
Form change clear mainform
« on: June 26, 2015, 05:31:23 AM »
Hi
When I use FormChange-button in mainform
mainform get empty.
Between other forms no problem.

KariM

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Form change clear mainform
« Reply #1 on: June 26, 2015, 06:42:13 AM »
The FormChangeButton really no code that could affect other components, so there must be something else causing this. You can use a standard Windows button to do the same thing.

- Add a Button from the All Windows Forms group in the Toolbox
- Double Click the button to get back to the code
- Add this code:

Form2.Show
Me.Hide


Change Form2 to the name of the form you want to open with the button.