How to send my visual basic 6.0 Application into the task bar / taskbars tool bar like windows media player ?

How would I achieve or do this in visual basic 6.0, so that when I have the toolbar checked ie when you right click on task bar and go to toolbars and then check the option to make your application sit in the toolbar, it will go to the taskbars toolbar when minimized and if that option is un checked it will just minimize the application normally.

Thank you :)
LVL 23
Shane Russell2nd Line Desktop SupportAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shane Russell2nd Line Desktop SupportAuthor Commented:
would you be able to convert it so that it has a popup menu that I can have to add it to the task bar and then some buttons on the taskbar toolbar to make it go back to what it was previously. or something to that extent. I tried the above example but cant figure out how to add it to the taskbar like windows media player.
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
ok I got that working and that is totally not what I wanted ! That is the system tray, I already know how to do that. I want to be able to intergrate it into the task bar just like windows media player or like google deskbar with the ability to click on something like a button or something that will make it go back to how it was before it got sent to the taskbar.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

cookreCommented:
Do you mean, perhaps, the Quick Launch tool bar?

If so, for XP, add a shortcut to:
Documents and Settings\<user>\Application Data\Microsoft\Internet Explorer\Quick Launch
0
Ralf KlattEmployee in Civil ServiceCommented:
Hi,

Please have a look at http://www.codeproject.com/csharp/dotnetbandobjects.asp

... I'm sure that the result shown is the desired one -> but, it's all about Visual C#!

How to utilize this desired functionality from VB6?
My suggestion is to try and rebuild the dotnetbandobjects in a simple DLL and just try to access the objects from a VB6 application ... have I ever done that? No! I haven't <- I've yet just accessed old VB DLLs from .Net!

Do I think that it could be possible? Yes, I'd think so! Reading this article http://aspn.activestate.com/ASPN/Mail/Message/DevelopMentor-dotNET/1221925 and some others underline the possibility!


Best regards,
Raisor
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
Just to confirm if you could explain so that I know for sure that you understand what I am talking about. Also any urls with regards to making or any other relevant info with regards to making the dll and what calls I would need to make from my main application using the dll, etc.

Thanks
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
I looked at the first one and from what I can gather I need a toolbar band in visual basic 6.0 without the text field, I just want it to look like windows media player. will take a screen shot and show you what I want it to look like.
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
0
Ralf KlattEmployee in Civil ServiceCommented:
Hi,

This is a complete project we're talking about ... I can provide you the most information know and that I might find ... but I can not take two or three days off ;-))

-> I couldn't get the CodeProject code to run ... there's D:\WINNT\EXPORER.EXE pre-defined and I didn't find the source yet ... anyway, most of the functionality is related to C++ and there's a pre-compiled DLL you'd have to use ... nothing if what I'd really like to use!

-> but have a look here: that looks much better!
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/faq/ietoolbar.asp

I'll have a closer look at it tomorrow ... as it's midnight right now in Germany!


Best regards,
Raisor
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
ok take a look at this :

http://uk.pg.photos.yahoo.com/ph/lucky_lizard2003/album?.dir=/79d2

there are some pics to show what windows media player looks like in full view, what it looks like in the task bar ( which is what I want my app to do ) and the right clicking of the menu option to enable / disable the task bar option.
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
Thats not a problem raisor, just so you know I was not talking about the one in internet explorer. I was reffering to the toolbar / taskbar at the bottom ie where your start button is and where windows media player goes to and where your mimised applications go.
0
Ralf KlattEmployee in Civil ServiceCommented:
Hi,

The band seems to be related to IE in any way ... at least this is what I've seen looking at the CodeProject source code -> the important thing for me is, that what's shown at the Microsoft has a relation to API functions that are accessible from VB6 too ...


Best regards,
Raisor
0
cookreCommented:
That sure sounds like the Quick Launch bar:


<StartButton> <Quick Launch Bar> <Task Bar> <Notification Area (aka System Tray)>

Am I missing something?
0
Mike TomlinsonMiddle School Assistant TeacherCommented:
cookre,

The Quick Launch Bar holds shortcuts.  What gecko is looking for is a DeskBand app which will take up a spot on the TaskBar just like the Quick Launch Bar but instead can display anything the application wants to just as if it was a form in the app.

Here are a couple screenshots of different deskband apps:
http://www.copperhead.cc/fmc_scr1.gif
http://www.consiliumsoft.com/ScreenShot.jpg
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
<Start Button><Quick Launch Bar><Task Bar><Google Deskbar OR Windows Media Player><Notification Area ( aka system tray>

Yes I want something simmiliar to windows media player so when you right click on the task bar , you get the toolbars >> option at the top and it allows you to check or uncheck if you want to allow or dis allow certain tool bars on the task bar.

Take a look here :

http://www.windowsitpro.com/Article/ArticleID/37648/37648.html

In that URL they call it mini player mode. I want to achieve a mini player mode in any application that I make so that you right click the taskbar --> Toolbars >> MY APPLICATION &#8730;  <-- where you check or uncheck if you want it to go into mini mode or what ever you want to call it.

I want my application to look something like the following :
___________________________________________________________________________________________________
 <<START>> <<QUICK LAUNCH>><<                    TASK BAR                >> | Maximise | Open  |<<  SYSTEM TRAY >>

Then when you click maximise it will make Form2 appear which will slowly scroll up or popup taking into consideration the placing / position of the mini mode application : It will look something like below


                                                                                                               
                                                                                                                 ________________
                                                                                                                |                            |
                                                                                                                |  Form that scrolls  |
                                                                                                                |            UP.           |
________________________________________________________________|________________|___________________
 <<START>> <<QUICK LAUNCH>><<                    TASK BAR                >> | Maximise | Open  |<<  SYSTEM TRAY >>

Do you understand now how it should look and what I am trying to achieve ?


0
Shane Russell2nd Line Desktop SupportAuthor Commented:
oopps sorry I explained that wrong, maximise is to make it revert back to what it looked like before it went to the task bar, ie just a regular form and open, opens form 2 which makes it look like the 2nd image I drew / typed out.
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
Exactly Idle_Mind, I want to know how to do that in coding or calling API's or w/e to achieve that in visual basic 6.0, whether I use dll's or sub classing to achieve this, I dont care as long as it works lol.
0
cookreCommented:
My pea brain grasps it now - I'll leave you to it...
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
my pea brain has no clue how to convert between C# to visual basic ( Porting code I think its called ) nor do I have any idea how to create an instance of a deskband app or any of that ! I mean if it makes it any better or w/e I am more then willing to split this question in to chunks and if you could help me with parts of it as I go.

I just want a deskband app at the end of the day :)
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
I found this :

http://www.codeproject.com/atl/ietoolbartutorial.asp

There are 2 other links as it says you have to download 2 other things. So I am getting closer but will still need help to convert / port coding to visual basic. I think they have an example in c# / c++.
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
ok this is frying my brain real fast lol. It uses ATL AppWizard and some other stuff. ok now im begining to go ga ga ga ga ga ga lol

If someone could get the c++ version working for me along with an exe example all in zip file and from there I can award points and re open a new question to help me port it from C++ to visual basic or something to that extent.

Thank you all :)
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
Here is a perfect example of what I am trying to achieve, it is for winamp and no its not source code :

http://fileforum.betanews.com/detail/Winamp_Deskband/1052475492/1
0
nffvrxqgrcfqvvcCommented:
Gecko_

Would this be of some help?

http://www.thescarms.com/vbasic/appbar.asp
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
I already found that earlier on, that just docks to the sides of the screen in a bar like office toolbars. Which was not what I wanted :-S
0
nffvrxqgrcfqvvcCommented:
Do you want it to be in the taskbar gecko?
0
nffvrxqgrcfqvvcCommented:
Gecko this might help you out if you look at the code, this is what you are looking for right? something like this? I know this isnt what you need but you could possible see how its done by looking at the source.

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=59312&lngWId=1
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Shane Russell2nd Line Desktop SupportAuthor Commented:
That is underneath the time in the system tray. I really like that ! That will be useful, however I still would like it in the task bar like that winamp deskbar.
0
nffvrxqgrcfqvvcCommented:
'Gecko I found the following on all api this is what you are looking for so all you need to do is manipulate it.
'Hope this steers you in the right direction

Const WS_CHILD = &H40000000
Const WM_LBUTTONDOWN = &H201
Const WM_LBUTTONUP = &H202
Const SW_HIDE = 0
Const SW_NORMAL = 1
Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hwnd As Long) As Long
Dim tWnd As Long, bWnd As Long, ncWnd As Long
Private Sub Form_Load()

    Dim R As RECT
    'Get the taskbar's window handle
    tWnd = FindWindow("Shell_TrayWnd", vbNullString)
    'Get the start-button's window handle
    bWnd = FindWindowEx(tWnd, ByVal 0&, "BUTTON", vbNullString)
    'Get the start button's position
    GetWindowRect bWnd, R
    'Create a new button
    ncWnd = CreateWindowEx(ByVal 0&, "BUTTON", "Hello !", WS_CHILD, 0, 0, R.Right - R.Left, R.Bottom - R.Top, tWnd, ByVal 0&, App.hInstance, ByVal 0&)
    'Show our button
    ShowWindow ncWnd, SW_NORMAL
    'Hide the start button
    ShowWindow bWnd, SW_HIDE
End Sub
Private Sub Form_Unload(Cancel As Integer)
    'show the start button
    ShowWindow bWnd, SW_NORMAL
    'destroy our button
    DestroyWindow ncWnd
End Sub

0
nffvrxqgrcfqvvcCommented:
Gecko_ I found the part your looking for about the form popping upfrom the taskbar...I am not at my computer right now but I will post the link when I get back to my computer.
0
Ralf KlattEmployee in Civil ServiceCommented:
Hi,

I've tried everythink to get the CodeProject source code to run -> no chance yet!

I can't re-invent the wheel by testing each possible API function to achieve the desired result ... so I'm sorry that can't be of further help -> have you tried to run http://www.codeproject.com/csharp/dotnetbandobjects.asp yet?


Best regards,
Raisor
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
ok I have never used c sharp before so what file do I have to open to get it to run and is there anyway of porting it to visual basic ?

Obviously you have a lot more experience in the programming field then myself and I still have a lot to learn and I am getting there slowly but surely :)
0
Ralf KlattEmployee in Civil ServiceCommented:
Hi,

... ok, to tell the truth ... I qualified in February this year as a "Software Developer .Net C#" ... so I can read and program Visual C#.NET and translate it to Visual Basic .NET ... it's some kind of a great advantage as you may imagine ... anyway, there's some kind of a problem when you can't get a project to run ... and I've tried a lot to make it run ...

... what you may do with the project http://www.codeproject.com/csharp/dotnetbandobjects.asp is to download it, to extract it and to Double Click the SLN file ... if the projects executes on F5 on your system then please let me know!


Best regards,
Raisor
0
Shane Russell2nd Line Desktop SupportAuthor Commented:
I split points between you because Raisor gave me good source code with regards to it but I am by no means in to the C# arena as of yet. Idle Mind explained exactly what i was attempting to do which helped a lot and egl gave me a great URL from pscode which wasnt exactly what I was looking for but I thought it was really good and it was in vb so that helped a lot :)

I just want to say thanks for all your input and help !
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.