slcboi
slcboi

Reputation: 63

C# Desktop App Bar (Somewhat Like a taskbar)

I've been googling a lot for this one and I can't seem to find anything. Maybe it's the way that I'm wording it. So basically what I'm looking to do in C# using Windows Forms, is create a form and have it essentially take the shape of the taskbar and do the same functions as the taskbar, but it will sit above the task bar or at the top of the screen.

It can't be "ON TOP" (I'm not trying to block user buttons like the close button of a program they are using).

Autohide would be a plus.

This is the main thing I'm after: It needs to act just like the task bar. When you maximize any other window, the taskbar does not go over the top of the window, even though it is set to "on top".

Upvotes: 4

Views: 11523

Answers (2)

Erre Efe
Erre Efe

Reputation: 15557

If you don't want to deal with C++ and Native Code (as @FKunecke correctly proposed) then you'll not find anything predefined for this. What you can do is create a form for your bar and make the visualization calculations by hand, then you can set the screen location of it. That's all. Not forcing the bar form to stay on top will not hide the other app forms so you'll get that for free.

Now, to fully implement what you want there are some problems you need to deal with, such as Taskbar location and height. Then you'll need to use some native code tricks.

Upvotes: 1

Forest Kunecke
Forest Kunecke

Reputation: 2160

You'll want to use an Appbar to do this:

http://msdn.microsoft.com/en-us/library/cc144177.aspx

For more information, check out here and here and here.

Upvotes: 5

Related Questions