7

i googled a lot and found out some info about the band object from which we can make the ad-in for the task bar, can i get some more tutorials from scratch & some sample programmes.

is there any other alternative way is there to place a control over the windows task bar apart from band objects?

Thanks in advance

Naruto
  • 9,476
  • 37
  • 118
  • 201
  • Why, exactly, do you want to place a control over the taskbar? If you're trying to *hide* the taskbar, there are better options. – Cody Gray - on strike Feb 15 '11 at 11:35
  • @Cody gray, actually i am thinking to make a text box placing in the task bar, which can be expandable like google desktop search bar. i want to make it in c# only, can i know is it possible – Naruto Feb 15 '11 at 12:14

2 Answers2

6

If you want to place a textbox in the taskbar like the Google Desktop search bar, then you're not actually trying to place the control over the taskbar, you want to place it within the taskbar.

The proper solution here is a Desk Band. You can find an MSDN article explaining those here. I'm not really sure why you say that you want to avoid band objects. That's the right way to do this.

                A desk band is basically a way to create a dockable window on the desktop. The user selects it by right-clicking the taskbar and selecting it from the Toolbars submenu.

                Initially, desk bands are docked on the taskbar.

There's even a sample implementation in C# available on Code Project: Extending Explorer with Band Objects using .NET and Windows Forms

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
  • @Cody, Yes i tried, but the code itself is not getting build in windows XP environment. so i m seeking your suggestion – Naruto Feb 15 '11 at 12:35
  • @LLL: So, the code in the article doesn't work at all? I somewhat doubt that. There are screenshots of it working in Windows XP. You're obviously doing something else wrong, and I can't debug that without any more information than you've provided. It looks like there's *another* sample available [here](http://www.codeproject.com/KB/cs/BandObjects20.aspx); maybe that will work better for you. – Cody Gray - on strike Feb 15 '11 at 12:36
  • @Cody, yes The screenshots he has provided, even i tried building the source in VS 2008 its not at all getting built, second one i will see, if it doesnt work ill get back to u – Naruto Feb 15 '11 at 12:58
  • @LLL: Do you get compiler errors or something? What do you mean by "not at all getting built"? If you're looking for some help, you're going to have to be a lot more descriptive than "it doesn't work". – Cody Gray - on strike Feb 15 '11 at 12:59
  • in performing post build operation i am getting like "Could not load file or assembly 'BandObjectLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4b827ebe229d539f' or one of its dependencies. The system cannot find the file specified." – Naruto Feb 16 '11 at 06:04
  • @LLL: You have to build the BandObjectLib project first. Looking at the article, there are already step-by-step instructions given. I'm not sure the merit of me repeating them here. – Cody Gray - on strike Feb 16 '11 at 06:10
  • @Cody, you are right, yes first we need to add the .snk file to project. then build & register either manually in VS command prompt or use the Register LIB it has post build events. Then it will be appear in menu which you get after right clicking and going to tool bar.. – Naruto Feb 16 '11 at 06:33
-2

To make a window overlap the Taskbar you can set it's TopMost property to true. But then you will have to control the positioning yourself, and it will also overlap anything else beneath it, but it is a solution at least :)

Øyvind Bråthen
  • 59,338
  • 27
  • 124
  • 151
  • i dont want like this, i want to place it on task bar, it can be stretchable like Google desktop search bar\ – Naruto Feb 15 '11 at 12:16
  • Then your only option is the Desk Band as suggested by Cody Gray. I would recommend trying the sample once again. There is no other good way of doing this, so then it's not a very good abandoning it just because you did not get it to work on the first attempt. – Øyvind Bråthen Feb 15 '11 at 12:42
  • 3
    Yeah, sometimes using other people's already-written code is nearly as hard as writing it yourself. *rolls eyes* – Cody Gray - on strike Feb 15 '11 at 12:50