如何打开在C#中的同一窗口的新形式的窗口? [英] How to open a new form window within same window in C#?

查看:124
本文介绍了如何打开在C#中的同一窗口的新形式的窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用C#应用程序,它有一个菜单,具有与其相连的形式,我想 应该有一个父窗体,具有面板或窗口,当我们点击任何菜单链接,它的.cs形式应该在窗口中加载的,所以我们可以点击其他窗口,其形式应该取代当前的。就像一个常见的​​Windows软件。

I am making an application in C#, and it has a menu, having forms linked with it, i want that there should be a parent form, having a panel or window, when we click on any menu link, its .cs form should be loaded in the window, and so we can click on other windows, and their forms should replace the current one. Just like a common windows software.

问候 Touseef汗

Regards Touseef Khan

推荐答案

您表(窗口)必须是MDI

Your Form(Window) must be MDI

YourForm.IsMdiContainer = True

NewForm.MdiParent = YourForm;
NewForm.Show();

这篇关于如何打开在C#中的同一窗口的新形式的窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆