Switching between to Forms within a single window

后端 未结 2 1802
一个人的身影
一个人的身影 2021-01-24 00:43

I want to change my form 1 into form 2. I don\'t want it to open a new window but keep it in the same window and then be able to go back and forth when I press the Next key or b

2条回答
  •  心在旅途
    2021-01-24 01:06

    You might want to consider a different approach.

    You can't change one type of form into a different type of form. The closest option would be to close or hide the first and show the second at the same location on the screen.

    However, you could approach this differently. Instead of putting your buttons and logic into a form, you could place everything into two UserControl instances, and just change which user control is visible within a single form.

提交回复
热议问题