Windows Develop Bookmark and Share   
 index > Windows Forms General > Change notify icon depending on visible or not
 

Change notify icon depending on visible or not

Hello.

I wonder how i do if i want to change a notifyicon depeding on if a textbox is visible or not.

I thought that i chould do something simple as this.
Use a IF statment when the form loads. Looks like this.

if (username.Visible == true)
   {
   notifyIcon1.Icon = PaddyCube.Properties.Resources.paddycubeoffline;
   }
   else
   {
   notifyIcon1.Icon = PaddyCube.Properties.Resources.paddycubeonline;
   }
My thing dose not work so good, how do i do this?
Alcstudio  Sunday, September 13, 2009 10:27 PM

copy paste the code in textbox VisibleChanged event and then check..

Bharath kumar Y.S  Monday, September 14, 2009 4:37 AM
Should it change on form loading or when any event occurs?
Bharath kumar Y.S  Monday, September 14, 2009 3:14 AM
I want it to change when a event occur.

I have a textbox. And when the textbox is no longer visible i want the icon to change.
Alcstudio  Monday, September 14, 2009 4:29 AM

copy paste the code in textbox VisibleChanged event and then check..

Bharath kumar Y.S  Monday, September 14, 2009 4:37 AM
Thanks
Alcstudio  Monday, September 14, 2009 4:46 AM

You can use google to search for other answers

Custom Search

More Threads

• TabControl ToolTips
• Splash Screen 2005
• How can I create rounded curve label in Winforms?
• How to prevent Combo Box automatic selection of text?
• how do i add a % formula
• Winfoms Multithreading Issue - Moving from 1.1 - 2.0
• Change MaskedTextBox border color.
• using HTMLElement.getAttribute for selecting <OPTION> in <SELECT> tag
• listbox issues
• Getting the active item of a ListView when MultiSelect is true (Different from SelectedItems collection!)