| |

VerySource

 Forgot password?
 Register
Search
View: 768|Reply: 5

How to display a task in the taskbar when running multiple forms? ? ?

[Copy link]

1

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-7 05:30:02
| Show all posts |Read mode
I have an mdi parent form and N mdi child forms, and I find that no matter how many child forms I run, the taskbar always displays only one task, the parent form. Now I want to place a button on the mdi subform, and press it to make another form appear. I use show now, but after doing so, the form that appears later will also be in the taskbar. Added a new task.
Please ask, how to do it, so that the open form does not create a separate task, just like when the mdi subform is displayed, the taskbar only displays one task of the parent form! !! !!
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-7 09:27:01
| Show all posts
Form.Show (IWin32Window)
How about using this method?
Reply

Use magic Report

1

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-7 11:06:01
| Show all posts
This will not work, the error is

Warning 1 The file "F:\DEMO\Form1.cs" does not support code analysis or generation because it is not included in the code-supported project.
Error 2 "System.Windows.Forms.IWin32Window" is a "type", but is used here as a "variable"

I don't have form1 in this project. My code inside the button click event is like this

            FrmOut Frm = new FrmOut ();
            Frm.Show (IWin32Window);
Reply

Use magic Report

1

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-7 11:12:01
| Show all posts
Wait online! !! !!
Reply

Use magic Report

0

Threads

56

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-1-7 13:57:01
| Show all posts
Set the ShowInTaskbar property of the form you don't want to display in the taskbar to false.
Reply

Use magic Report

1

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-1-8 11:45:02
| Show all posts
LS is right, thank you very much! !! !!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list