Creating a Taskbar Toolbar (like Google's Deskbar)

NickOlsen
01-07-2005, 09:52 PM
Google has come out with a tool where you can search various google sites from a textbox that resides in the windows start taskbar. (http://toolbar.google.com/deskbar/index.html for more info) I have a smiliar program that I have written that searches various websites and provides various functions for my users. But, at this point it is just a small windows form that contains a textbox and is docked at one side of the screen. Does anyone know how I would go about doing the exact same thing google has done with the textbox that actually resides on the taskbar??

NickOlsen
01-08-2005, 01:37 AM
I found this website and I am able to do it with c#, but does anyone know how to do it in vb .net?? http://www.codeproject.com/csharp/dotnetbandobjects.asp

AtmaWeapon
01-08-2005, 08:28 AM
Converting BandObjectLib to VB .NET would involve writing wrapper classes for all the APIs and, while not difficult, would be extremely tedious. It is not necessary.

I got this far converting the example toolbar to VB .NET, it has an error and I can't quite figure out what's going on. Put the following in a Class Library project and make a reference to BandObjectLib and maybe someone else can figure out what's going on. It claims the attribute has the wrong number of arguments but both sets of arguments have 3 parameters :confused:


Imports System
Imports System.ComponentModel
Imports System.Windows.Forms

Imports BandObjectLib
Imports System.Runtime.InteropServices

Namespace SampleBars
<GuidAttribute("038FB566-2296-4dd0-8B4D-0E63BE8D8F28"), _
BandObject("Shows bar that says hello.", "Hello World Bar", BandObjectStyle.Horizontal Or BandObjectStyle.ExplorerToolbar Or BandObjectStyle.TaskbarToolBar)> _
Public Class HelloWorldBar2
Inherits BandObject

Private button1 As System.Windows.Forms.Button
Private components As System.ComponentModel.Container = Nothing

Public Sub New()
InitializeComponent()
End Sub

Protected Overloads Sub Dispose(ByVal disposing As Boolean)
If (disposing) Then
If (Not components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

#Region "Component Designer generated code"
Private Sub InitializeComponent()
Me.button1 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
' button1
'
Me.button1.Anchor = (((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right)
Me.button1.BackColor = System.Drawing.SystemColors.HotTrack
Me.button1.ForeColor = System.Drawing.SystemColors.Info
Me.button1.Name = "button1"
Me.button1.Size = New System.Drawing.Size(150, 24)
Me.button1.TabIndex = 0
Me.button1.Text = "Say Hello"
AddHandler Me.button1.Click, AddressOf Me.button1_Click
'
' HelloWorldBar
'
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.button1})
Me.MinSize = New System.Drawing.Size(150, 24)
Me.Name = "HelloWorldBar"
Me.Size = New System.Drawing.Size(150, 24)
Me.Title = "Hello Bar"
Me.ResumeLayout(False)

End Sub
#End Region

Private Sub button1_Click(ByVal Sender As Object, ByVal e As System.EventArgs)
MessageBox.Show("ZZZZZZ Hello, World!")
End Sub

End Class

End Namespace

NickOlsen
01-08-2005, 11:00 AM
I actually did some converting myself and ran into the same problem and haven't been able to find out why the problem comes up. Thanks! Maybe someone else will know

NickOlsen
01-08-2005, 07:54 PM
The Error:

Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement.

is on this line


<GuidAttribute("038FB566-2296-4dd0-8B4D-0E63BE8D8F28"), _
BandObject("Shows bar that says hello.", "Hello World Bar", BandObjectStyle.Horizontal Or BandObjectStyle.ExplorerToolbar Or BandObjectStyle.TaskbarToolBar)> _


Any Ideas?

UnFoundBug
03-31-2008, 12:34 PM
Well, iv ben trying this for a while, i used to do all my programming in VB6, but that was for coursework, this is currently for a personal project, im simply trying to get a progress bar to display in the taskbar that will auto-update every so often, getting the tray bit is proving tricky, so im just trying to get a bar to appear at the moment. I don't get the issue regarding the Guid, i get nothing the message box does work, but thats it.

Who knows maybe all thats needed is a fresh look

Imports System
Imports System.ComponentModel
Imports System.Windows.Forms
Imports BandObjectLib
Imports System.Runtime.InteropServices
Namespace HardDRive_TaskBar
<Guid("6e8351b2-98b6-4390-b8e5-1e73737bd22e"), BandObjectAttribute("HardDriveBar", BandObjectStyle.TaskbarToolBar, HelpText:="Allows the bar to show hard-drive usage")> _
Public Class Form2
Inherits BandObject
Private MainBar As System.Windows.Forms.ProgressBar
Private NewComponents As System.ComponentModel.Container = Nothing

Public Sub New()
InitializeComponent()
MsgBox("Form2 Loaded")
End Sub
#Region "Component Designer generated code"
Public Sub InitializeComponent()
Me.MainBar = New System.Windows.Forms.ProgressBar
Me.SuspendLayout()
'
'MainBar
'
Me.MainBar.BackColor = System.Drawing.Color.DarkGreen
Me.MainBar.ForeColor = System.Drawing.Color.AliceBlue
Me.MainBar.Location = New System.Drawing.Point(0, 0)
Me.MainBar.Name = "MainBar"
Me.MainBar.Size = New System.Drawing.Size(150, 15)
Me.MainBar.TabIndex = 0
'
'Form2
'
Me.Controls.Add(Me.MainBar)
Me.MinSize = New System.Drawing.Size(150, 15)
Me.Size = New System.Drawing.Size(150, 15)
Me.Name = "Form2"
Me.Title = "The Monitor"
Me.ResumeLayout(False)

End Sub
#End Region
Public Sub MainBar_Click(ByVal Sender As Object, ByVal e As System.EventArgs)
End Sub

End Class
End Namespace

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum