我想看看当我点击Alt +选项卡时,我设置了showtaskbar = true,但是没有发生任何事情,我通过下面的代码调用表单
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();发布于 2018-01-17 12:22:01
这是故意的行为。
引用https://msdn.microsoft.com/en-us/library/system.windows.forms.form.showintaskbar.aspx
如果某个窗体在另一个窗体中为父窗体,则该父窗体不会显示在Windows任务栏中。
如果需要任务栏中显示的一个应用程序的多个窗口,请不要使用MdiParent/MdiChild。
有一个hack可以为您工作,但它可能是不可持续的(可能在未来版本的Windows)。
https://stackoverflow.com/questions/48300935
复制相似问题