Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: TheAvengerPosted on 2003-09-01 at 05:55:05ID: 9261364
Every form in .Net has a method called ShowDialog() which "Shows the form as a modal dialog box." with or without a parent. The form is then closed by pressing the respective (assigned by you) accept or cancel buttons (see Form.AcceptButton and Form.CancelButton). The method ShowDialog() returns a result showing which button was pressed. So you can put two buttons on the form, one for next, one for back. Then assign the next button as accept button, the back button as cancel button and then open the form with ShowDialog(). Check the result and react in the proper way based on your logic. Be careful with closing the form with the X button in the upper right corner which will also close the form.