MouseEnter and MouseLeave Events

Posted 28 November 2013 - 11:49 PM

I'm having a bit of trouble getting my MouseEnter and MouseLeave events to work. I have label3 set to false, and label3's visibility property should be getting changed by the MouseEnter and MouseLeave events of my MonthCalendar control.

Re: MouseEnter and MouseLeave Events

Posted 29 November 2013 - 12:43 AM

The only reason I can't abandon this format is that is this is a homework assignment. I'm supposed to make label3 upon enter and leave to set to true and false. But I don't understand what I'm doing wrong.

Re: MouseEnter and MouseLeave Events

Posted 29 November 2013 - 08:08 AM

Lines 36 and 46 are a real problem. You are subscribing to those events EVERY TIME you mouse over. That means more and more and more subscriptions. They stack up.And they make no sense: On mouse enter you make another subscription to mouse enter?? WTF?

I get the distinct impression you aren't grasping how events, and subscribing to events works.

Check the C# tutorials: I created a tutorial just on mouse events. I'm doing this on my iPad or I would have a direct link to give you. You can also check my blog as there is an entry with a list of my tutorials.