[RESOLVED] SIMPLE: Indicate whether mouse left particular windows form control?
I'm sure I've done this before but I cant find any online resources on this topic to remind me...
After the user has changed the text of textboxA and moved the mouse off that particular control, I would like my method to be executed. What bool expression determines whether the user's mouse has left the control?
Code:
if (!textboxA.Focused && textboxA.Text != String.Empty) // textboxA.Focused isnt working!
{
ExecuteMethod();
}
Re: SIMPLE: Indicate whether mouse left particular windows form control?
Don't think like that. .NET uses an event driven model, so utilize the MouseLeave event. The Control.Focused property has nothing to do with the mouse.
Re: SIMPLE: Indicate whether mouse left particular windows form control?
thank you! I used "leave" instead of "mouseleave" which works even better :)