?
Solved

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

Posted on 2005-03-17
35
Medium Priority
?
911 Views
Last Modified: 2012-06-27
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 :)
0
Comment
Question by:gecko_au2003
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 18
  • 6
  • 5
  • +4
35 Comments
 
LVL 10

Expert Comment

by:makerp
ID: 13568231
0
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13568286
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13568348
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Expert Comment

by:cookre
ID: 13568573
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
 
LVL 15

Expert Comment

by:Ralf Klatt
ID: 13568654
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13569595
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13569626
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
 
LVL 15

Expert Comment

by:Ralf Klatt
ID: 13570191
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13570272
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13570291
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
 
LVL 15

Expert Comment

by:Ralf Klatt
ID: 13570455
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
 
LVL 22

Expert Comment

by:cookre
ID: 13570585
That sure sounds like the Quick Launch bar:


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

Am I missing something?
0
 
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 400 total points
ID: 13570666
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13570686
<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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13570693
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13570700
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
 
LVL 22

Expert Comment

by:cookre
ID: 13570737
My pea brain grasps it now - I'll leave you to it...
0
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13570764
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13570810
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13570909
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13570999
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
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 13571035
Gecko_

Would this be of some help?

http://www.thescarms.com/vbasic/appbar.asp
0
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13571039
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
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 13571046
Do you want it to be in the taskbar gecko?
0
 
LVL 29

Accepted Solution

by:
nffvrxqgrcfqvvc earned 800 total points
ID: 13571059
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13571155
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
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 13571464
'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
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 13579415
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
 
LVL 15

Expert Comment

by:Ralf Klatt
ID: 13592422
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13592509
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
 
LVL 15

Assisted Solution

by:Ralf Klatt
Ralf Klatt earned 800 total points
ID: 13593769
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
 
LVL 23

Author Comment

by:gecko_au2003
ID: 13614694
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

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Progress
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question