AdvancedHMI Software
General Category => Support Questions => Topic started by: andrew_pj on August 24, 2015, 05:15:32 AM
-
I am using AHMI-V398t, I have 2 forms: form 1 and form 2.
Form 1 has FormChangeButton component to navigate to Form 2.
Form 2 has FormChangeButton component to navigate to Form 1.
I try navigating continuously from Form 1->Form 2->Form 1->Form 2->etc...
This works fine if I let to have some delay in between (about 1 second).
But if I rapidly navigate, the Form will exit automatically.
No error message, nothing.
Please advise a solution regarding this.
Thank you.
Best regards,
Andrew
-
The form change button uses a short time overlap in transitioning between forms for aesthetic purposes on slower systems. This also creates a small opportunity of time in which you can get both forms hidden. If you open FormChangeButton.vb and go to line 92, you can shorten that time delay:
ht.Interval = 250
-
Hi Archie,
I changed until ht.Interval = 10, but at some point the form is still closed.
Then I tried changing to 0 and test again, but suddenly the Visual Studio crash.
Now everytime I open AdvancedHMIv35.sln, it is always crash.
So I debug, and the error in attachment appears.
Please advise the solution.
Thank you.
Best regards,
Andrew
-
Close Visual Studio and delete the following directories:
\AdvancedHMI\bin
\AdvancedHMI\obj
\AdvancedHMIControls\bin
\AdvancedHMIControls\obj
\AdvancedHMIDrivers\bin
\AdvancedHMIDrivers\obj
re-open AdvancedHMI and Rebuild Solution
-
Thanks, now I can open Visual Studio and run the application.
Do you have suggestion for the FormChangeButton?
I understand if it has some delay to support transition.
But when the application exit suddenly, end-user will be confused and think of it as bug.
Best regards,
Andrew
-
You can use a regular windows button:
- From the All Windows Forms group in the Toolbox, add a Button to your form
- Double click the button to get back to the code
- Enter this code:
Form2.Show
Me.Hide
Change Form2 to the name of the form you want to show
-
Ok, thanks Archie.