From: Norm on


"Karl E. Peterson" <karl(a)exmvps.org> wrote in message
news:urFIeOk4KHA.620(a)TK2MSFTNGP02.phx.gbl...
> Norm wrote:
>> I have an app that runs in the system tray and you click on the icon to
>> use functions within the app. Occasionally I have noticed that for some
>> reason the app is running but no icon is showing in the system tray,
>> which means you cannot access the app.
>
> Presumably, you're putting it there properly, using subclassing to monitor
> window messages, right? If so, you also need to watch for this one:
>
> ' Registered message sent when Explorer (re)creates taskbar
> Private Const TaskbarCreatedString As String = "TaskbarCreated"
>
> ' Determine value for "new taskbar" message.
> m_msgNewTaskbar = RegisterWindowMessage(TaskbarCreatedString)
>
> When you get it, just recreate your taskbar icon with another call to
> ShellNotifyIcon.
>
>> When I start a new instance of the app it tells me that the app is
>> already running and then shuts down the new instance. I have tried the
>> following code, but since the app is only running in the system tray I
>> cannot show the app.
>>
>> Is there a better way to do this so that I can get the apps icon to
>> appear in the system tray?
>
> IF the disappearance is not related to Windows recreating the taskbar,
> you'll have to send a message to the previous instance when it's found,
> and tell it it needs to recreate its notification icon. I'm betting the
> first trick will do it, though.
>
> --
> .NET: It's About Trust!
> http://vfred.mvps.org
>
>

Karl, Nobody,

Thanks for the information I will play around with both of those and see
what I come up with. It does not happen very often, but I seem to be able to
cause it by using task manager to stop the explorer process. Not very
elegant, but usually when you do this not all the icons will be displayed
when explorer restarts.

I probably did not explain this very well, but the problem does seem to be
related to explorer having a problem and restarting.

I do have all the icons displayed on my taskbar, none of them are hidden.

It may be awhile before I get back, I have been playing around with trying
to make a CD to run all my old dos floppies off of.

Thanks,
Norm

From: Karl E. Peterson on
Norm wrote:
> "Karl E. Peterson" <karl(a)exmvps.org> wrote...
>> Norm wrote:
>>> I have an app that runs in the system tray and you click on the icon to
>>> use functions within the app. Occasionally I have noticed that for some
>>> reason the app is running but no icon is showing in the system tray, which
>>> means you cannot access the app.
>>
>> Presumably, you're putting it there properly, using subclassing to monitor
>> window messages, right? If so, you also need to watch for this one:
>>
>> ' Registered message sent when Explorer (re)creates taskbar
>> Private Const TaskbarCreatedString As String = "TaskbarCreated"
>>
>> ' Determine value for "new taskbar" message.
>> m_msgNewTaskbar = RegisterWindowMessage(TaskbarCreatedString)
>>
>> When you get it, just recreate your taskbar icon with another call to
>> ShellNotifyIcon.
>
> Thanks for the information I will play around with both of those and see what
> I come up with. It does not happen very often, but I seem to be able to cause
> it by using task manager to stop the explorer process. Not very elegant, but
> usually when you do this not all the icons will be displayed when explorer
> restarts.
>
> I probably did not explain this very well, but the problem does seem to be
> related to explorer having a problem and restarting.

Yeah, that's what I thought, from your description. In that case,
watching for that TaskbarCreated message is *exactly* what you need to
do. When you get that, just recreate your icon. :-)

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Norm on


"Karl E. Peterson" <karl(a)exmvps.org> wrote in message
news:eC$$kFY5KHA.4888(a)TK2MSFTNGP06.phx.gbl...
> Norm wrote:
>> "Karl E. Peterson" <karl(a)exmvps.org> wrote...
>>> Norm wrote:
>>>> I have an app that runs in the system tray and you click on the icon to
>>>> use functions within the app. Occasionally I have noticed that for some
>>>> reason the app is running but no icon is showing in the system tray,
>>>> which means you cannot access the app.
>>>
>>> Presumably, you're putting it there properly, using subclassing to
>>> monitor window messages, right? If so, you also need to watch for this
>>> one:
>>>
>>> ' Registered message sent when Explorer (re)creates taskbar
>>> Private Const TaskbarCreatedString As String = "TaskbarCreated"
>>>
>>> ' Determine value for "new taskbar" message.
>>> m_msgNewTaskbar = RegisterWindowMessage(TaskbarCreatedString)
>>>
>>> When you get it, just recreate your taskbar icon with another call to
>>> ShellNotifyIcon.
>>
>> Thanks for the information I will play around with both of those and see
>> what I come up with. It does not happen very often, but I seem to be able
>> to cause it by using task manager to stop the explorer process. Not very
>> elegant, but usually when you do this not all the icons will be displayed
>> when explorer restarts.
>>
>> I probably did not explain this very well, but the problem does seem to
>> be related to explorer having a problem and restarting.
>
> Yeah, that's what I thought, from your description. In that case,
> watching for that TaskbarCreated message is *exactly* what you need to do.
> When you get that, just recreate your icon. :-)
>
> --
> .NET: It's About Trust!
> http://vfred.mvps.org
>
>

Thanks Karl, I will be trying that in a few days, I am still playing around
with trying to create a bootable CD that will give the message to hit any
key to boot from CD and then have available all the utilities that I used to
use from DOS, which will allow me to archive a whole lot of floppy disk's.
:-)

Norm

From: Nobody on
"Norm" <NormF4(a)spoof.com> wrote in message
news:29D06F1F-0CB9-4B1F-90BB-84450C34FE97(a)microsoft.com...
> Thanks Karl, I will be trying that in a few days, I am still playing
> around with trying to create a bootable CD that will give the message to
> hit any key to boot from CD and then have available all the utilities that
> I used to use from DOS, which will allow me to archive a whole lot of
> floppy disk's. :-)

Off topic: You can use the free MS Virtual PC and install DOS on it so you
don't have to reboot to test a bootable CD. It supports ISO files, so there
is no need to burn CD's, it also includes BIOS and you can change the boot
sequence, just like if you had a second PC.

http://www.microsoft.com/windows/virtualpc/default.mspx

http://en.wikipedia.org/wiki/Windows_Virtual_PC


From: Norm on


"Nobody" <nobody(a)nobody.com> wrote in message
news:OqXt53f5KHA.4740(a)TK2MSFTNGP06.phx.gbl...
> "Norm" <NormF4(a)spoof.com> wrote in message
> news:29D06F1F-0CB9-4B1F-90BB-84450C34FE97(a)microsoft.com...
>> Thanks Karl, I will be trying that in a few days, I am still playing
>> around with trying to create a bootable CD that will give the message to
>> hit any key to boot from CD and then have available all the utilities
>> that I used to use from DOS, which will allow me to archive a whole lot
>> of floppy disk's. :-)
>
> Off topic: You can use the free MS Virtual PC and install DOS on it so you
> don't have to reboot to test a bootable CD. It supports ISO files, so
> there is no need to burn CD's, it also includes BIOS and you can change
> the boot sequence, just like if you had a second PC.
>
> http://www.microsoft.com/windows/virtualpc/default.mspx
>
> http://en.wikipedia.org/wiki/Windows_Virtual_PC
>

>

Nobody,

That is exactly what I am doing, but as with regular software the virtual
pc's do not always act the same as a real pc, since they are using what is
now considered to be antique hardware. :-)

I was playing around with extracting the boot sectors of CD's and making an
ISO and then creating a CD that should have been bootable, but was not
recognized by my Virtual PC, but when I accidentally left it in my regular
PC when I shut down, it did boot into it.

Thanks for the information though.

Norm