-
June 22nd, 2010, 12:41 PM
#1
[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();
}
-
June 22nd, 2010, 02:08 PM
#2
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.
-
June 23rd, 2010, 06:54 AM
#3
Re: SIMPLE: Indicate whether mouse left particular windows form control?
thank you! I used "leave" instead of "mouseleave" which works even better
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|