471,354 Members | 1,213 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Create Task List or Task Bar in C#

Hello all!

I am trying to create a replacement task bar for windows (don't ask
why..) in C#, and have run into some troubles.

I am aware that i can get a list of running processes (using
System.Diagnostics.Process), however this is ALL processes, and i ONLY
WANT the ones that would show on the task bar normally.

I noticed that if i looked at a Processes MainWindowTitle property, i
could weed out most things i didn't want by just igoring those with an
empty Title, however this will miss a few!
Mainly, if i have a few open My Computer instances, this will only
catch the first one.

I also tried at least two methods using Windows API's (mainly
GetWindow, two different ways), but this returns even more junk i don't
want, and i don't see any way to tell which ones would be displayed on
the task bar.

Can anyone help?

Thanks in advance!

Feb 7 '06 #1
2 7594
Well, the task bar only shows available windows, not those processes.

Try using the win api like EnumWindowEx or similar functions.

As you asked, I won't ask why, but I can think the question. :-)

<ma******@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hello all!

I am trying to create a replacement task bar for windows (don't ask
why..) in C#, and have run into some troubles.

I am aware that i can get a list of running processes (using
System.Diagnostics.Process), however this is ALL processes, and i ONLY
WANT the ones that would show on the task bar normally.

I noticed that if i looked at a Processes MainWindowTitle property, i
could weed out most things i didn't want by just igoring those with an
empty Title, however this will miss a few!
Mainly, if i have a few open My Computer instances, this will only
catch the first one.

I also tried at least two methods using Windows API's (mainly
GetWindow, two different ways), but this returns even more junk i don't
want, and i don't see any way to tell which ones would be displayed on
the task bar.

Can anyone help?

Thanks in advance!

Feb 7 '06 #2
I have some code using EnumWindowEx, however using it i ended up with a
lot of windows i didn't care about again. What do you mean by
"available windows" ? Have any example code?

I'll look around some more for some ways to use EnumWindowEx.

Anyone else have any examples or advice?

I'm gonna need a way to emulate the System Tray too eventually, if
anyone has any thoughts on that.

Thanks!

-Quasar
Peter Rilling wrote:
Well, the task bar only shows available windows, not those processes.

Try using the win api like EnumWindowEx or similar functions.

As you asked, I won't ask why, but I can think the question. :-)

<ma******@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hello all!

I am trying to create a replacement task bar for windows (don't ask
why..) in C#, and have run into some troubles.

I am aware that i can get a list of running processes (using
System.Diagnostics.Process), however this is ALL processes, and i ONLY
WANT the ones that would show on the task bar normally.

I noticed that if i looked at a Processes MainWindowTitle property, i
could weed out most things i didn't want by just igoring those with an
empty Title, however this will miss a few!
Mainly, if i have a few open My Computer instances, this will only
catch the first one.

I also tried at least two methods using Windows API's (mainly
GetWindow, two different ways), but this returns even more junk i don't
want, and i don't see any way to tell which ones would be displayed on
the task bar.

Can anyone help?

Thanks in advance!


Feb 8 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Oliver Gräser | last post: by
3 posts views Thread by Mark Preuss | last post: by
4 posts views Thread by PJSimon | last post: by
reply views Thread by Chris Dunaway | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.