26071986
26071986

Reputation: 2330

Main form not shown in Taskbar

What could be the reasons for the Main application form not to be shown in TaskBar?

ShowInTaskbar property is set to "true", but form doesn't show itself there if after running the application and before the Main form appears I switch to some other window. Form exists, but until I minimize apps that are above to make it visible, it won't show in Taskbar.

UPDATE. Form does not have an Owner.

Upvotes: 6

Views: 4129

Answers (5)

Tim Ward
Tim Ward

Reputation: 1

I had the same issue as @deegee where setting MinimumSize in the Form Load causing the non display in the Taskbar. I fixed the issue with setting the Form Visible to False then to True.

Upvotes: 0

Dan W
Dan W

Reputation: 3628

I had a similar issue when the program was run from an installer (InstallMate in my case). I eventually pinned the problem down to changing the form's title text (Text) in the Form1_Load() method. When I moved that title changing text to just below the InitializeComponent(); bit, the problem went away.

I hope this can help someone else, despite the specificness of my circumstances.

Upvotes: 0

deegee
deegee

Reputation: 1623

I had the same issue with one project I wrote. No icon showing in the Taskbar unless I forced Windows to refresh it.

It was a call to

this.MinimumSize = new Size(wid, len);

In the Form_Load that was the issue.

Upvotes: 0

26071986
26071986

Reputation: 2330

I've added form.Activate() after form.Show(). Now it always jumps out when completely loaded, and doesn't get lost under some other screens.

Though it is not a solution, but a crutch, responses are welcome anyway.

Upvotes: 8

Phil Wright
Phil Wright

Reputation: 22906

Check if your main form has a Parent defined or an Owner. In either case that would exclude it from being in the task bar in its own right. Also worth trying TopMost=true.

Upvotes: 0

Related Questions