Showing status in system tray - how to?

R

Richard Dixson

Hi - I'm looking to write application that runs in the background to monitor
the number of records in a database table.

That seems easy enough. However I want to display these results in the
bottom right hand corner on XP, right next to the clock. Is this possible?

I know that I can write an app that sits in the system tray and that shows
an icon in there. But I'm looking to actually have a bit more space and be
able to display numbers that are updated in real time.

Put another way, let's say I wanted to write an application just like the
default Windows XP clock. How would I do this? For example, the clock sits
down there in the tray, is always visible and displays numbers and text
"9:00 PM" in realtime. I want my application to work the same exact way in
this respect. Is that possible, or is there something extra special about
the XP clock that another application cannot mimic in terms of how its
integrates into the system tray area.

I'd appreciate any tips, clues or names of classes etc that I need to pursue
in other to pull this off, as I really don't have any idea how to go about
this or if it is even possible.

Thanks!
 
H

Herfried K. Wagner [MVP]

* "Richard Dixson said:
Hi - I'm looking to write application that runs in the background to monitor
the number of records in a database table.

That seems easy enough. However I want to display these results in the
bottom right hand corner on XP, right next to the clock. Is this possible?

I know that I can write an app that sits in the system tray and that shows
an icon in there. But I'm looking to actually have a bit more space and be
able to display numbers that are updated in real time.

Put another way, let's say I wanted to write an application just like the
default Windows XP clock. How would I do this? For example, the clock sits
down there in the tray, is always visible and displays numbers and text
"9:00 PM" in realtime. I want my application to work the same exact way in
this respect. Is that possible, or is there something extra special about
the XP clock that another application cannot mimic in terms of how its
integrates into the system tray area.

I wouldn't do that. The size of the notification area is very small and
on Windows XP parts of the tray will be hidden automatically. Instead,
I would create a borderless and semi-transparent form which is shown
"always on top".
 
F

Flare

I wouldn't do that. The size of the notification area is very small and
on Windows XP parts of the tray will be hidden automatically. Instead,
I would create a borderless and semi-transparent form which is shown
"always on top".

Better yet. Write a bandobject enabled form. This would allow you to attach
a real Form app just beside your system tray.

Have a look at this:
http://www.codeproject.com/csharp/dotnetbandobjects.asp?target=band

I think it would be perfect for you.

Regards
Anders Jacobsen, Denmark
 
D

Dennis Patterson

Thanks - looks very interesting. However I was a bit confused about what
properties or methods I should set to attach it just beside the system tray.
For example that demo shows how to make the application part of the IE bar
at the top, but how do I specifically tell it to attach just beside the
system tray?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top