Code archives/User Libs/System tray icon

This code has been declared by its author to be Public Domain code.

Download source code

System tray icon by Kev2004
adds support for adding an icon,and menus. allows sending events when your blitz windows dont have focus.(hidden)

an example is included.
homepage.ntlworld.com/pamela.poole/TaskBar.zip

Comments

Agamer2004
Looks kwl will get it later


Kevin_2004
Most impressive Kev. I did actually see another example ages ago but it didn't work on my system. This one works great.

A much needed feature for Blitz Plus so thanks.


Klaas2004
cool .. needed that badly :-) ... thanks man


Kev2004
when i get time i was thinking of adding drag&drop feature to blitz windows.


asdfasdf2004
When I downloaded it and ran the exe it wouldn't work. It popped up with an error message. And the bb file had a function missing. Never mind


Kev2004
it does? its not QueryObject() by any chance.


electronin2004
Very cool, Kev!
@Blitz Programer - what OS are you running on your computer?


Litobyte2004
BlitzCC V1.85
(C)opyright 2000-2003 Blitz Research Ltd
Compiling "C:\folder\TaskBarTrayExample.bb"
Parsing...
Generating...
"C:\foler\TaskBarTrayExample.bb"
Line 78 Function 'hidegadget' not found


What Am I missing ?


electronin2004
HideGadget() is a BlitzPlus function. If you have Blitz3D, then it won't work.


Klaas2004
when the application is hidden the programm is suspended .. is it possible to catch some timer ticks while hidden ?

The "TaskBarEvent(hWnd,0,0,0,0)" command themes to halt execution of the programm ... any ideas to solve this problem ?

thx


rdodson412004
Yes, it completely halts execution of the program. Is there anyway so that it will still work and recieve events and stuff? Plus, is there anyway to change the icon as to make my own icon? Thanks in advance.


Binary_Moon2004
I've been playing with this a bit the last couple of days as well :)

The taskBar event pauses everything each time it is called. For now I'm just not using it, and just using the TaksBarMenuEvent since that's all I need. Would be interesting to know why it's so slow though.

Plus, is there anyway to change the icon as to make my own icon?


That one's easy. Create an icon and then specify it in the addTrayIcon command. Mine looks like this

Add_Tray_Icon("Title"+Chr(0),hwnd,"icon.ico")



rdodson412004
How do i create an icon? i know how to add it so it uses it in the program.


Binary_Moon2004
Use an icon editor - there are loads around but I recommend http://www.snidesoft.com/


rdodson412004
Thx it works great. But has anyone solved the problem of getting events to a program when its in the task bar?


asdfasdf2004
Will it work without the HideGadget()? With Blitz3D?


rdodson412004
I dont know about B3D, but without the hidegadget it will still be visible.


rdodson412004
Has anyone figured out how to give events to the thing while its minimized into the tray?


Kev2004
Rich05 the .dll only sends events to your program it wont receive all events only standard events, to check what events are received use sys_tray() function. also make sure the tray icon has focus. a rewritten version will go into WinBlitz3D, complete with better event handles.


asdfasdf2004
Is there a version that will work with Blitz3D?


rdodson412004
I doubt it, youll probably have to make it yourself.


Pineapple2004
Nice!!!

Dabz

:)


gman2004
has anyone been successful at changing the popup menu once its been set? if i call DeleteIconMenu() after i have already added menu items, i cant seem to add more and have it function properly. any ideas on what i may be doing wrong?

thank you.


Kev2004
gman, i havent tryed that. so thanks for pointing it out. i will not be working on this anymore. all my spare time is being used on two projects im coding blitzlockit and winblitz3d.


Arem2005
Where is it now?


Samuel2005
http://myweb.tiscali.co.uk/blitzbasic/TaskBar.zip


Sub_Zero2006
where is it now? :)


Compt-Man2007
yay where


Nike2009
where is it now?


markcw2009
http://blitznews.wordpress.com/blitzmirror/


em222009
nice one :)


Nike2009
cool but if i was going to use this in a program and sell the program, or just use the program, would i have to say like "Made by Kevin Poole, kevin.poole@lineone"
?
or just put your name in credits or would i have to do nothing at all? Im not going to sell or rename the dll, but include the dll in my program.


Kev2009
no credit needed


Code Archives Forum