16
Support Questions / multiforms closing problem
« on: May 08, 2017, 07:02:30 AM »
hello
in my hmi project
i have 6 pages
the first one is the main
it has 5 buttons each button opens a form
what i do is the other five forms have close button that closes them and return to the main page
the button code is
now when i run the application
i can go to tow pages
when i try to open a third page it gives me runtime error
so i need to close them not hide them
but when i try the code
or
it gives an error too
so what is the best way to open the forms and close them
the open form code i use is
with thanks
in my hmi project
i have 6 pages
the first one is the main
it has 5 buttons each button opens a form
what i do is the other five forms have close button that closes them and return to the main page
the button code is
Code: [Select]
Me.Hide()
mainpage.Show()
.now when i run the application
i can go to tow pages
when i try to open a third page it gives me runtime error
so i need to close them not hide them
but when i try the code
Code: [Select]
Me.close()
mainpage.Show()
or
Code: [Select]
Me.close()
it gives an error too
so what is the best way to open the forms and close them
the open form code i use is
Code: [Select]
page1.show()
with thanks