tags:

views:

333

answers:

2

I have created a taskbar using tabcontrols which works similarly to the Windows taskbar. I want to make my own taskbar fixed on top of the windows.

It should not be movable, resizable, and it should be "docked" to the top.

+3  A: 

I have not tried to do this, but my first attempt would be the following:

  • set form to be 'TopMost'
  • set border to 'None'
  • set Location: (0,0), Size(Screen.Width,H), where H is the Height you want your form to be
  • set 'ShowInTaskBar' to false

Something you might consider: how will you handle multiple screens?

You'll likely want to add a context menu allowing you to exit the application, since it won't have the normal system buttons. Also, you might consider what happens when the user presses ALT-F4: will your program close? If not, you'll need to add some code in the FormClosing event handler to cancel closing.

Hope this sets you in the right direction!

Charlie Salts
+1  A: 

A long long time ago Jeffery Richter demonstrated how to do a true taskbar in a sample called AppBar (I've used it myself as a boiler plate), so here are some pages that may be of interest:

http://www.google.com/search?q=Jeffrey+Richter+appbar+c#

danbystrom