Reputation: 6492
I am making an application which will take a search query from the user and display the results. To make the interface more user friendly, I thought of making a textbox in the taskbar which accepts input and then displays the results in a new window. I have looked into the links of the same question both on SO as well as other sites.
Based on what I have found out by using google and other sites that we need to use Bands to achieve this thing.
Can somebody please explain me the solution to the above problem(Bands), you can point out any good links or some articles also, or you can write a code sample to explain.
I just want enough information to get me started on the solution to this problem.
Upvotes: 4
Views: 2310
Reputation: 272
"You should use thumbnail toolbars in new development in place of desk bands, which are not supported as of Windows 7." -MSDN
Unfortunately, it appears that Microsoft is discouraging the creation of in-taskbar GUIs like what you're talking about. The alternative option is to use taskbar extensions, as discussed here. MSDN does appear to give some contradictory information on the taskbar extension page, directing developers to the IDeskBand2 page (where the quote at top is from). For future compatibility, I'd still recommend against it.
If you're dead set on it, or you're only targeting xp (or vista) for some reason, the following might be helpful:
Although they can be used much like normal windows, band objects are COM objects that exist within a container. Explorer Bars are contained by Internet Explorer, and desk bands are contained by the Shell. While they serve different functions, their basic implementation is very similar. The primary difference is in how the band object is registered, which in turn controls the type of object and its container. This section discusses those aspects of implementation that are common to all band objects. See A Simple Example of a Custom Explorer Bar for additional implementation details. In addition to IUnknown and IClassFactory, all band objects must implement the following interfaces:
- IDeskBand
- IObjectWithSite
- IPersistStream
In addition to registering their class identifier (CLSID), the Explorer Bar and desk band objects must also be registered for the appropriate component category. Registering the component category determines the object type and its container. Tool bands use a different registration procedure and do not have a category identifier (CATID). The CATIDs for the three band objects that require them are:
- Band Type: Component Category
- Vertical Explorer Bar: CATID_InfoBand
- Horizontal Explorer Bar: CATID_CommBand
- Desk Band: CATID_DeskBand
Just about everything you'd need to know can be found here
Upvotes: 2