在表格内打开表格 [英] opening a form inside a form

查看:97
本文介绍了在表格内打开表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您能帮我...需要代码吗,
在窗体中打开窗体.....就像从Photoshop主菜单中打开图像窗体一样.

Can u plz help me...need code for,
opening a form inside a form .....just like opening a image form from a Photoshop main menu.

推荐答案

窗体?馊主意.不推荐.

您可以做到这一点,但是什么是表单却不能像表单一样工作,所以为什么不使用面板或更好的TabControl(请参见下文)这样的容器:
无论如何,请看下面的讨论:在面板组件上打印表单 [ ^ ].

以一种形式进行所有操作.如果仅需要某些层次结构,请使用基于TabControl的选项卡式界面. 重要提示:请勿使用MDI!即使Microsoft也强烈建议不要使用MDI样式.这将非常不便,难以实施,并且可能会使您的用户感到恐惧.也许很多年前,如果没有那么容易获得良好控制的容器,这可能是可以容忍的.

—SA
A form? Bad idea. It is not recommended.

You can do the trick, but what is was a form won''t behave like a form, so why not using some container like panel or, better, a TabControl (see below):
Anyway, look at this discussion: print a form on a panel component[^].

Do everything in one form. If you simply need some hierarchy, use tabbed interface based on TabControl. Important: don''t use MDI! MDI style is highly discouraged, even by Microsoft. It would be extremely inconvenient, harder to implement and could simply scare of your users. Perhaps it could be remotely tolerable many years ago when good control containers were not so readily available.

—SA


您需要将父表单设置为您要从中打开新表单的表单
frmnew.parent = frmold
frmnew.open

如果.open方法不可用,请尝试.show
u need to set the parent form to the form that u r opening the new one from
frmnew.parent = frmold
frmnew.open

if .open method is not available try .show


尝试MDI表单.此链接将为您提供帮助:)

使用C#(演练)创建MDI应用程序 [使用C#引入MDI表单 [使用C#浏览的多文档界面(MDI)标签页 [了解System.Buffer类 [
try MDI forms.. this link will help you :)

Creating MDI application using C# (Walkthrough)[^]
Introduction to MDI Forms with C#[^]
Multi Document Interface (MDI) tab page browsing with C#[^]
Understanding the System.Buffer class[^]


这篇关于在表格内打开表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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