469,596 Members | 2,288 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,596 developers. It's quick & easy.

icon problem in taskbar

Dear my friends,

I have been helped by many C# gurus here, thank you very much.
My small application can help you fetch some good pictures from Internet.
You can get it from
http://members.rogers.com/5725brian/...tImages1.0.zip. No
virus guarantee, nothing will harm your computer, trust me. Have fun to use
it.
But I still have some simple questions. When I run this program, it will
display a icon on taskbar. But this icon won't disappear itself even the
program has already exited if you won't use mouse to over it. How to fix
this problem?
And, if I want to keep this icon staying at taskbar when the program is
running, like yahoo messenger, how to do?
Thanks again.

Brian

Nov 16 '05 #1
2 2275
Brian,

You need to explicitly clean up your system tray icon on a close event (or
Exit from a menu or something) of your application. If your application is a
single dialog form, catch the Close event and clean up your tray icon. To
keep the app running when a user clicks close, you need to catch the Close
event and tell it to cancel the close and hide your form. This will keep
your application running, your icon in the system tray, and no taskbar
button.

Goodluck!

Adam

"Brian" <Br*********@hotmail.com> wrote in message
news:P_********************@news20.bellglobal.com. ..
Dear my friends,

I have been helped by many C# gurus here, thank you very much.
My small application can help you fetch some good pictures from Internet.
You can get it from
http://members.rogers.com/5725brian/...tImages1.0.zip. No
virus guarantee, nothing will harm your computer, trust me. Have fun to
use
it.
But I still have some simple questions. When I run this program, it will
display a icon on taskbar. But this icon won't disappear itself even the
program has already exited if you won't use mouse to over it. How to fix
this problem?
And, if I want to keep this icon staying at taskbar when the program is
running, like yahoo messenger, how to do?
Thanks again.

Brian

Nov 16 '05 #2
To get rid of the icon when the app closes, catch the form's Close event.
In the event handler, call "this.Dispose();".

Cletus

"Brian" <Br*********@hotmail.com> wrote in message
news:P_********************@news20.bellglobal.com. ..
Dear my friends,

I have been helped by many C# gurus here, thank you very much.
My small application can help you fetch some good pictures from Internet.
You can get it from
http://members.rogers.com/5725brian/...tImages1.0.zip. No
virus guarantee, nothing will harm your computer, trust me. Have fun to
use
it.
But I still have some simple questions. When I run this program, it will
display a icon on taskbar. But this icon won't disappear itself even the
program has already exited if you won't use mouse to over it. How to fix
this problem?
And, if I want to keep this icon staying at taskbar when the program is
running, like yahoo messenger, how to do?
Thanks again.

Brian

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Morten Bendsen | last post: by
7 posts views Thread by Russ via AccessMonster.com | last post: by
3 posts views Thread by jm | last post: by
reply views Thread by Jean Bredeche | last post: by
reply views Thread by Richard | last post: by
2 posts views Thread by flaper87 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.