Windows Forms switch between Panels

淺唱寂寞╮ 提交于 2019-12-11 02:39:15

问题


I'm writing a program that has two main functions. Each of the functions will have a different user interface, on a separate Panel, but only one will be visible at a time. But, how do I switch between them?


回答1:


Look at the visible property of the Panel(s)

Panel1.Visible = True
Panel2.Visible = False



回答2:


You can set the panels' Visible properties to show one and hide the other.



来源:https://stackoverflow.com/questions/6254308/windows-forms-switch-between-panels

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!