积极答复者
请问附图效果是如何实现的?

问题
答案
-
Hi leon1526,你可以尝试使用panel1来加载不同form窗体的内容。
this.panel1.Controls.Clear();// Form1 form = new Form1{ TopLevel = false, FormBorderStyle = FormBorderStyle.None }; this.panel1.Controls.Add(form );//把form里的内容添到panel中 form.Show();//
你也可以尝试用MdiParent属性来控制form嵌入form吧。或者用tabcontrol。上面的建议是基于Winform的基础上。其他技术或许稍微有点差别。
Note:请记住通过标记有用的帖子作为答案来关闭您的主题,然后如果您有新问题,则启动新的主题。 请不要在同一个主题中提出几个问题。
Best Regards,Yohann Lu
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- 已标记为答案 leon1526 2017年9月13日 13:34
全部回复
-
Hi leon1526,你可以尝试使用panel1来加载不同form窗体的内容。
this.panel1.Controls.Clear();// Form1 form = new Form1{ TopLevel = false, FormBorderStyle = FormBorderStyle.None }; this.panel1.Controls.Add(form );//把form里的内容添到panel中 form.Show();//
你也可以尝试用MdiParent属性来控制form嵌入form吧。或者用tabcontrol。上面的建议是基于Winform的基础上。其他技术或许稍微有点差别。
Note:请记住通过标记有用的帖子作为答案来关闭您的主题,然后如果您有新问题,则启动新的主题。 请不要在同一个主题中提出几个问题。
Best Regards,Yohann Lu
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- 已标记为答案 leon1526 2017年9月13日 13:34
-
写法的概念就是如下:
Tree.MouseClick += Tree_NodeMouseClick;
private void Tree_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { TreeNode selNode = (TreeNode)Tree.GetNodeAt(Tree.PointToClient(Cursor.Position)); if (selNode != null) { if (selNode.IsExpanded) { //下面就是你要控制的元件 Label1.Visible = True; } else { //下面就是你要控制的元件 Label2.Visible = True; } } }
- 已编辑 電腦神手吳子陵 2017年9月13日 9:29