将控件移至另一种形式/仅显示一个控件 [英] Move control to another form / Show only one control

查看:68
本文介绍了将控件移至另一种形式/仅显示一个控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将控件移至另一种(空)形式?这样我就可以隐藏第一种形式.

我不能只隐藏form1上的所有控件,因为我要关注的控件位于选项卡控件中.

有什么建议吗?


让我解释一下:

我有一个自定义图片框,例如控件,该控件正在流式传输网络摄像头供稿.
但是我希望能够最大化"流,因此隐藏所有其他控件并将控件的大小调整为窗体大小.您所追求的,但是如果您需要将程序中的控件移动到另一个选项卡或表单,我会说UI设计有问题.通常,您应该添加必要的控件,例如让TabControl来处理更改"tabs"时的隐藏.同样适用于表单,您添加必要的控件,而不是将控件从一种表单移动到另一种表单,而是将数据从control1移至control2.


Is it possible to move a control to another (empty) form? This way i can just hide the first form.

I can''t just hide all the controls on form1, because the control i want to focus on is inside a tab control.

Any suggestions?


Let me explain some more:

I have a custom picturebox like controls which is streaming a webcam feed.
But i want to be able to "maximize" the stream, so hide all other controls and resize the control to the form size.

解决方案

Didn''t quite get what you were after but if you need to move controls in your program to another tab or form, I''d say there''s something wrong with the UI design. Typically you should add necessary controls and let for example TabControl to take care of the hiding when tabs'' are changed. Same applies to forms, you add necessary controls and instead of moving the control from one form to another you move the data from control1 to control2.


这篇关于将控件移至另一种形式/仅显示一个控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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