How to open a new form from another form

后端 未结 11 1622
太阳男子
太阳男子 2020-12-03 00:29

I have form which is opened using ShowDialog Method. In this form i have a Button called More. If we click on More it should open another form and it should close the curren

11条回答
  •  离开以前
    2020-12-03 01:23

    You could try adding a bool so the algorithm would know when the button was activated. When it's clicked, the bool checks true, the new form shows and the last gets closed.

    It's important to know that forms consume some ram (at least a little bit), so it's a good idea to close those you're not gonna use, instead of just hiding it. Makes the difference in big projects.

提交回复
热议问题