AdvancedHMI Software
General Category => Support Questions => Topic started by: g.mccormick on April 10, 2018, 09:50:20 AM
-
I am building a dispaly that will have 6-7 screens that are accessed from the home screen. I've found that if you X out of a sub screen, then advanceHMI is still running in background and you cannot re-open the application. I would like to either disable the X or better yet have the X return to the home screen same as my HOME button does. How would I go about this?
-
There is some info in these topics:
https://www.advancedhmi.com/forum/index.php?topic=1356.0
https://www.advancedhmi.com/forum/index.php?topic=303.0
-
If memory serves correctly, you can use this in your pages so that when they are closed it reopens the main form. This way, the main form must be closed to "X" the application. I went through this same thing a while ago and this solved my problems.
Private Sub Page2_FormClosing(sender As Object, e As EventArgs) Handles MyBase.Closing
AdvancedHMI.MainForm.Show()
End Sub
-
If memory serves correctly, you can use this in your pages so that when they are closed it reopens the main form. This way, the main form must be closed to "X" the application. I went through this same thing a while ago and this solved my problems.
Private Sub Page2_FormClosing(sender As Object, e As EventArgs) Handles MyBase.Closing
AdvancedHMI.MainForm.Show()
End Sub
Or, just e.cancel = true
-
If memory serves correctly, you can use this in your pages so that when they are closed it reopens the main form. This way, the main form must be closed to "X" the application. I went through this same thing a while ago and this solved my problems.
Private Sub Page2_FormClosing(sender As Object, e As EventArgs) Handles MyBase.Closing
AdvancedHMI.MainForm.Show()
End Sub
Or, just e.cancel = true
Can you explain more?
I removed the border, but do not like that you cannot more or resize the window now.
-
If memory serves correctly, you can use this in your pages so that when they are closed it reopens the main form. This way, the main form must be closed to "X" the application. I went through this same thing a while ago and this solved my problems.
Private Sub Page2_FormClosing(sender As Object, e As EventArgs) Handles MyBase.Closing
AdvancedHMI.MainForm.Show()
End Sub
That worked great thank you.
I had removed the border, but did not like losing the ability to resize, move, etc the windo.
-
If you are now using the FormClosing event to show the MainForm then you can put the border back on the form.
This means that even if a user clicks "X" it will only close that form, fire the FormClosing event thus show the MainForm.