Hi,
I want my app icon to go in the systray when I minimized it, with a
popup menu that appear when I right-click on the icon in the systray.
I used a freeware class for this since a few years (clsSysTray.cls,
made by Martin Richardson) and it worked well with pre-Windows XP
version, but in Windows XP sometime the icon doesn't appear in the
system tray, and the app is loaded in memory! My app loads with
Windows (Startup folder) and goes automatically in the systray at
startup, maybe sometime WinXP "forget" the icon while it is loading
everything else, I don't know???
Unless someone use an updated version of this class which works fine
in XP (if it exists I didn't found it!), I need suggestion for
freeware code that work fine in ALL version of Windows.
Thanks.
Jack
Randy Birch - 26 Aug 2004 04:18 GMT
http://vbnet.mvps.org/code/subclass/shellnotifybasic.htm

Signature
Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
: Hi,
:
[quoted text clipped - 16 lines]
:
: Jack
Jack - 26 Aug 2004 14:41 GMT
Hi Randy,
Thanks for your answer. I already found and tried your demo a few
days ago (yes, I made some search before posting my question ;-) and
it works very well, but I forgot to mention a specification I need:
1) When my app is open I want its icon in the normal task bar (with or
without its icon in the system tray at the same time, I can accept
both).
2) When my app is minimized I want its icon in the task bar to
DISAPPEAR and be replaced by its icon in the system tray.
The raison for this is that my app is an organizer that (usually) is
always running on the user computer, and I want to free space on the
task bar when my app is minimized by the user and not used. This way
more space will be available on the task bar and the user will have
access to the most used functions by a right-click menu on the icon in
the system tray without having to open the app window.
Can you demo be modified in such a way?
Thanks.
Jack
> http://vbnet.mvps.org/code/subclass/shellnotifybasic.htm
>
[quoted text clipped - 18 lines]
> :
> : Jack
Dave Mayes - 30 Aug 2004 12:24 GMT
> Hi Randy,
>
[quoted text clipped - 44 lines]
> > :
> > : Jack
Hi Jack.
I have had the same problem with my app. It is actually caused by your app
loading before the systray. I've been trying (unsuccessfully) to trap the
message systray generates when it's finished loading. A (naff) work arround
is to delete and reload the icon on a timer set at 1 minute intervals.
HTH
Dave
J French - 30 Aug 2004 13:51 GMT
<snip>
>I have had the same problem with my app. It is actually caused by your app
>loading before the systray. I've been trying (unsuccessfully) to trap the
>message systray generates when it's finished loading. A (naff) work arround
>is to delete and reload the icon on a timer set at 1 minute intervals.
Try creating and deleting some Mutexes during the process
- or use semaphores
Frank Adam - 30 Aug 2004 23:04 GMT
>I have had the same problem with my app. It is actually caused by your app
>loading before the systray. I've been trying (unsuccessfully) to trap the
>message systray generates when it's finished loading. A (naff) work arround
>is to delete and reload the icon on a timer set at 1 minute intervals.
You should only enable the tray, once you're past your main form's
Activate event, or issue a me.show before the call to 'tray.show'.

Signature
Regards, Frank
Randy Birch - 31 Aug 2004 00:18 GMT
That should work. And if the intent is to add the icon without showing the
form on the screen, the OP could issue a Move statement in the load event to
move the form off-screen by setting something like form1.move -20000.

Signature
Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.
: >I have had the same problem with my app. It is actually caused by your app
: >loading before the systray. I've been trying (unsuccessfully) to trap the
[quoted text clipped - 3 lines]
: You should only enable the tray, once you're past your main form's
: Activate event, or issue a me.show before the call to 'tray.show'.
Lindsay - 26 Aug 2004 11:58 GMT
Try mine. www.microcreate.co.uk and browse through the VB6 source code. The
menu will have to be done manually, but it does include a demo so you can
see how. And (if I've remembered to update it) it also includes the balloon
tips for XP.
> Hi,
>
[quoted text clipped - 16 lines]
>
> Jack