How do i create a search box type app in the Tasbar (Not system tray)
Hi All,
I spotted the Google DeskBar (Image below in case you dont know what I mean) and the Nero Search bar a few days back and thought it would be great if I could combine it with a meridian dialing app I use at work. At the moment i am only concerned with getting the search type box into the taskbar but I cant seem to find any info on how to do it. Anyone got any idea how I would accomplish it or have a link for some code that will do the same? The dialing app is written in VB6 so it would be best if the code was VB6 too but i can live with VB.NET.
Once i have the search box working ill see what i can do with integrating with the meridian app.
An example of the Google Deskbar is shown below:
http://desktop.google.com/en/GB/images/pref_deskbar.jpg
A similar program written in C++ (With way too many features for what i want) is here: http://www.dqsd.net/
Thanks in advance,
Gareth.
# 1 Re: How do i create a search box type app in the Tasbar (Not system tray)
I think my previous post was a little unclear. I am trying to find out how to get a search type box into the taskbar in the first instance and will worry about linking it to the meridian app at a later stage.
Thanks in advance,
Gareth.
# 2 Re: How do i create a search box type app in the Tasbar (Not system tray)
Anybody have any ideas? Is it even possible with VB?
Thanks,
Gareth.
# 3 Re: How do i create a search box type app in the Tasbar (Not system tray)
Maybe these links wil help. After following the links, you'd have the ability to create a Desktop toolbar ( which could be customised according to your needs; ie. location of the bar, and controls on the bar )
How to develop a Toolbar in VB that's to be shown in WinXP Taskbar? (http://www.dev-archive.com/forum/showthread.php?t=397305&highlight=desktop+toolbar)
Desktop Toolbar (http://www.dev-archive.com/forum/showthread.php?t=363138&highlight=desktop+toolbar)
# 4 Re: How do i create a search box type app in the Tasbar (Not system tray)
Hi Mate,
I appreciate the reply. It does sound like what im looking for but i cant seem to get it working to find out for certain. When i use the code example from the readme i get the following error:
"Compile Error: User-Defined type not defined"
and the following peice of code is highlighted:
WithEvents appBar As TCAppBar
Im quite new to VB and have only really dabbled with things like QBasic and Attachmate's built in macro editor before so im not sure where to start. I have just ordered VB6 for dummies (Being a complete VB dummie at present) and will work through that when it arrives but in the mean time, any chance of a nudge in the right direction?
Thanks,
Gareth.
# 5 Re: How do i create a search box type app in the Tasbar (Not system tray)
Hey Gareth!
You would need to set a Reference. to the dll.
OK, follow these steps :
Start a new Visual Basic 6 project.
Select Project, References...
Click Browse in the displayed dialog box
Then, you locate the file named AppBar.dll and select it
Once selected, it should show in the References list, click OK
Once that is done, you can use & reference the functionalities of that dll in your program, and you shouldn't get errors :)
# 6 Re: How do i create a search box type app in the Tasbar (Not system tray)
Hi Mate,
I got it working by following your idiot proof guide so thanks for that :). I spent 20mins trying to work out how to make it open on the bottom by default and it seemed so simple when i finally got it but its all part of the learning process.
Its not quite what i am after as its more a taskbar replacement than a taskbar app. I have done some mock ups of the way it is at the moment and how i would like it so if you are able to help at all i would really appreciate it
Here is how it appears at the moment (Note that it part covers the start button / menu so is this a bug? When in left hand mode it cuts off half the start button):
http://www.rhsnetworks.com/CurrentSetup.jpg
This is what i am after if it is possible:
http://www.rhsnetworks.com/WhatIRequire.jpg
I basically want the app to be on the taskbar itself instead of floating above or the way the meridian app pops up from the system tray. The design will change massivly so ignore the current size problems and crap design.
Thanks for your help thus far mate,
Gareth.
# 7 Re: How do i create a search box type app in the Tasbar (Not system tray)
Try this Gareth :
Dim tc As New TCAppBar
Private Sub Form_Load()
Dim cx As Long
Dim cy As Long
Dim RetVal As Long
tc.AlwaysOnTop = False 'always on top like taskbar
tc.AllowFloat = True 'can be moved around
tc.AutoHide = False 'autohide like taskbar
tc.SlideEffect = True 'slide
tc.ConformWithTaskBar = True
tc.MaxHeight = 250
tc.MinHeight = 50
tc.Attach Me.hwnd 'attach form to it, meaning, this form is now the taskbar at the top
tc.EDGE = ABE_BOTTOM 'At bottom straight away
Me.Height = tc.MaxHeight
End Sub
Private Sub Form_Unload(Cancel As Integer)
tc.Detach
Set tc = Nothing
End Sub
Private Sub Command1_Click()
MsgBox "Test"
End Sub
This will allow you to place this "toolbar" on any edge of the screen ( that might be the ultimate result ).
If this doesn't work completely, then, I think there might be another option ( which I'm not totally happy with :) ). That is to use the SetWindowPos API to just show the form as part of the taskbar's coords. The problem with that, is that it won't actually be part of the taskbar :(
# 8 Re: How do i create a search box type app in the Tasbar (Not system tray)
It's interesting how Nero creates the Nero Search box in taskbar.
http://uploads.neowin.net/forum/post-33791-1156160029.jpg
Maybe also "fake" [not part of taskbar]?
I mean window without border on top of taskbar.
# 9 Re: How do i create a search box type app in the Tasbar (Not system tray)
This is how all the ones i have seen look so i am not really sure.
If you do the overlay onto the taskbar co-ords, will the open programs shown in the taskbar end up underneath it or will the bunch up like normal?
Thanks,
Gareth.
# 10 Re: How do i create a search box type app in the Tasbar (Not system tray)
It will bunch up like normal, but if it does get in the way of our program, we could always force the Taskbar to group similar taskbar buttons.
Another idea I've been ponering about ( perhaps a bit absurd :D - you'l find that most of my ideas are usually a bit absurd, but works mostly ), is to create the Textbox on the TitleBar of our form - it is possible.
Let me work on these ideas, I'm not sure when I'll have something for you, but if you're willing to give me a bit of time... :)
# 11 Re: How do i create a search box type app in the Tasbar (Not system tray)
Hi mate,
I appreciate your help with this. I have now recieved my book so have started working my way through (The first 1/4 i seem to already know so perhaps its familirity with other languages and the windows environment) and thus dont need this feature yesterday so if / when you come up with something just let me know.
Thanks,
Gareth.
# 12 Re: How do i create a search box type app in the Tasbar (Not system tray)
Hi Mate,
Did you have any joy with getting it to sit on the taskbar itself?
Thanks,
Gareth.
# 13 Re: How do i create a search box type app in the Tasbar (Not system tray)
Hi Gareth! :)
OK, the idea of having a textbox on the Titlebar sadly didn't work
I've been researching Deskbands with VB 6 for quite some time now, but sadly couldn't find a decent way of creating a deskband application ( such as Media player ).
I did figure out how to place a window anywhere on the screen, meaning, even over the taskbar ( and that it didn't hide under the taskbar ) :
Option Explicit
Private Declare Function SetWindowPos& Lib "user32" (ByVal Hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)
Const HWND_TOPMOST = -1
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Private Const SW_SHOWNORMAL As Long = 1
Private Sub Form_Load()
StayOnTop Me
End Sub
Public Sub StayOnTop(frm As Form)
SetWindowPos frm.Hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
End Sub
I'm still working on this, but, I should say that I'm not getting anywhere quickly :(
Otherwise, we must try to just place this form over the taskbar, group the taskbar buttons, and take it from there
# 14 Re: How do i create a search box type app in the Tasbar (Not system tray)
MSDN talks about that.
http://msdn2.microsoft.com/en-us/library/aa969320.aspx
Also this book is useful if u are trying to make it in VB.
http://www.isbnonline.com/VB-Shell-Programming/book/9781565926707/
Coz MSDN example is in C++, its better to create ActiveX control with VC++ and use it in VB.
# 15 Re: How do i create a search box type app in the Tasbar (Not system tray)
MSDN talks about that.
http://msdn2.microsoft.com/en-us/library/aa969320.aspx
Also this book is useful if u are trying to make it in VB.
http://www.isbnonline.com/VB-Shell-Programming/book/9781565926707/
Coz MSDN example is in C++, its better to create ActiveX control with VC++ and use it in VB.
Good links!
I did come across them too, after weeks and weeks of doing research on this matter, I basically came to the same conclusion. Yes, I know VC++ quite good, but not that good :(
I did ask a question in the Visual c++ forum, so I hope those geniuses there can help us.
Sorry Gareth, I tried my best for you mate, I just hope you're not as disappointed as I :)
# 16 Re: How do i create a search box type app in the Tasbar (Not system tray)
Gareth, I'm still trying with this one, I ended up creating a thread in the VC++ forum, and got some great advice - but I should say that this is extremely complicated stuff, and that there's a lot of "behind the scenes" stuff that needs to be created.
For interest sake, have a look at this thread, and see what I've got to do :)
TaskBar DeskBand (http://www.dev-archive.com/forum/showthread.php?t=432330)
# 17 Re: How do i create a search box type app in the Tasbar (Not system tray)
Hi Mate,
Not had chance to check this thread for a while and tbh was suprised to see that you were still trying to find a solution for me. I appreciate all your help with this as i certainly have not got a clue what your talking about in the C++ thread and would not have got anywhere with it.
Thanks again,
Gareth.
# 18 Re: How do i create a search box type app in the Tasbar (Not system tray)
I am quite persistent, and don't give up quite easily. I like challenges.
But, I'm not getting very far with this, really, I'm battling to get the VC++ stuff to work :(
I have tried my best, and I will ( belive it or not ), still try to get this done, because I really think, such a program is worthwhile, and plenty of people would benefit from this thread ( when it eventually is solved ).
just thought I'd inform you..
# 19 Re: How do i create a search box type app in the Tasbar (Not system tray)
Something like this?
http://www.dqsd.net/
# 20 Re: How do i create a search box type app in the Tasbar (Not system tray)
Hannes: Thanks mate, i do appreciate it :)
DGlienna: Yeah, i found that program early on and mentioned it in my initial post but i just ignored it hoping to find a VB6 solution (As its written in C++). Hannes has been doing his best for quite a while now and im still holding out hope that he works something out. He also posted about writing a C++ module or something Here (http://www.dev-archive.com/forum/showthread.php?t=432330).
If you can offer any help it sure would be appreciated,
Thanks,
Gareth.
# 21 Re: How do i create a search box type app in the Tasbar (Not system tray)
Well, I saw add-ins for IE that adds the searchbar in the taskbarl.
You'd have to worry about each os as well.
# 22 Re: How do i create a search box type app in the Tasbar (Not system tray)
At present we use Windows 2000 and Windows XP and we are unlikly to move to Vista for a fair few years so OS should not be a problem.
Thanks,
Gareth.
# 23 Re: How do i create a search box type app in the Tasbar (Not system tray)
Im still not having any joy finding a solution with this so if anyone has any fresh ideas i would appreciate it.
Thanks,
Gareth.
# 24 Re: How do i create a search box type app in the Tasbar (Not system tray)
Office 2007 has LIVE SEARCH in the taskbar.