views:

21

answers:

1

In my project i have one parent window form with one menu bar and one status bar. that is what i want is: when i show the child form to see in the status ber an icon relative to the child window. How i can do that? And if that can't be how i can see an icon in a task bar? Please if anyone can assist me on this.

+1  A: 

You'd need to, when you show the CHILD window, add an ICON to the status bar of the main window, and when the child closes or is hidden, remove the icon.

Here's a site describing how to add an icon to a status bar.

http://www.devasp.net/net/articles/display/426.html

drventure
Dear, Thank you very much for your effort to solve my issue. Your suggested code was a good start to go to the mentality of the process. I did create a code suitable in vb.NET and now i'm working to close the strip panel when the child window is closed. Tahnks any way.
Lefteris Gkinis
Glad to hear it helped. Would be nice if there was a dedicated control for such a thing, but I'm guessing it would generally be so specific to the application at hand that it'd be tough to genericize the concept. Sounds like you've got a good handle on a solution though!
drventure
Yes that is the true. But now i'm facing a new issue. I solve the previous matter of closing the strip panel when the child window is closed. now i need this, when i minimize the child window to minimized on the atatus bar and not in a place up to this. i can do that with a trick but i don't know if that is serious to do. Do you have any idea about?
Lefteris Gkinis
Just off the top of my head, I'd think you'd need to add some code to the SIZECHANGED or the RESIZE event, check the windowstate to see if it's now MINIMIZED, and then, set an internal flag and HIDE the window instead, then update your icon in your statusbar however you might want to. then in the click event of the status bar icon, restore the window as applicable.
drventure
Yes that was my general idea and i will do that. But now i'm facing another issue and i will put it as a new question. see you there. thanks alot
Lefteris Gkinis