按alt + tab后如何显示form1和from2 [英] How can I show both form1 and from2 after pressing alt+tab

查看:95
本文介绍了按alt + tab后如何显示form1和from2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我必须使用两种形式,如Form1和Form2。加载Form1时显示From1和form2。当我按下Alt + Tab后,只显示Form1时,不显示Form1和Form2。



我尝试过:



当我按下Alt + Tab后,只显示Form1,但我需要同时显示Form1和Form2。我不知道如何解决它,请帮帮我.....

解决方案

如果你让另一个表单拥有一个表单,就会发生这种情况。 (不要将它与控制之间的父子关系混淆,默认情况下,对于表单有效地解散。)通常,主表单拥有其他表单。



请参阅:

https://msdn.microsoft.com/en-us/library/system.windows.forms.form.owner(v = vs.110).aspx [ ^ ]。



对于除主要表单之外的所有表单,将 ShowInTaskBar 设置为false也很好。如果表单的引用传递给 Application.Start ,则表单变为main。



-SA

Hello,
I have to use two forms like Form1 and Form2. When loading a Form1 shows a From1 and form2. When I after pressing of Alt+Tab in show only Form1 isn't show both Form1 and Form2.

What I have tried:

When I after pressing of Alt+Tab in show only Form1 but I need to show both Form1 and Form2. I don't how to fix it, please help me.....

解决方案

It will happen if you make one form owned by another one. (Don't mix it up with parent-child relationship between control, which is, by default, made effectively defunct for forms.) Usually, main form owns other forms.

Please see:
https://msdn.microsoft.com/en-us/library/system.windows.forms.form.owner(v=vs.110).aspx[^].

It also good to set ShowInTaskBar to false for all forms except the main one. A form becomes main if its reference is passed to Application.Start.

—SA


这篇关于按alt + tab后如何显示form1和from2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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