Menu Strip with Questions

antrew80

Member
Joined
Jul 1, 2014
Messages
8
Programming Experience
Beginner
Hi, i must make a book through VB with chapter and questions for each chapter.
For menu and question i used menustrip.
My question is how to go to each question every timer without need to write the same code like
VB.NET:
 Form31.Show()
        Me.Visible = False
....

 Form32.Show()
        Me.Visible = False

attached is a screen shot of my menustrip

temp.jpg

thanks a lot
 
I would suggest that you shouldn't be hiding the current form when you open a new form to show a question. You should probably be calling ShowDialog on the new form, so that it will be displayed as a modal dialogue. Just note that closing a modal dialogue doesn't dispose it, so you will have to dispose it manually if you don't want to reuse the same instance each time.

You're still going to have to determine which form to display on each menu item click though. If you're using the default instance of each form, as you currently are, I don't see any better option than handling each Click separately.
 
Back
Top