首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在TaskBar C#中显示

在TaskBar C#中显示
EN

Stack Overflow用户
提问于 2018-01-17 12:15:17
回答 1查看 858关注 0票数 0

我想看看当我点击Alt +选项卡时,我设置了showtaskbar = true,但是没有发生任何事情,我通过下面的代码调用表单

代码语言:javascript
复制
  childForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            childForm.MaximizeBox = false;
            childForm.MinimizeBox = false;
            childForm.StartPosition = FormStartPosition.Manual;
            childForm.ControlBox = false;
            childForm.MdiParent = MdiParent;
            childForm.ShowInTaskbar = true;
            childForm.ShowIcon = true;
            childForm.Location = new Point(Screen.PrimaryScreen.Bounds.Width - 1360, 5);
            childForm.Show();
EN

回答 1

Stack Overflow用户

发布于 2018-01-17 12:22:01

这是故意的行为。

引用https://msdn.microsoft.com/en-us/library/system.windows.forms.form.showintaskbar.aspx

如果某个窗体在另一个窗体中为父窗体,则该父窗体不会显示在Windows任务栏中。

如果需要任务栏中显示的一个应用程序的多个窗口,请不要使用MdiParent/MdiChild。

有一个hack可以为您工作,但它可能是不可持续的(可能在未来版本的Windows)。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48300935

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档