Thread monitor user input

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am trying to figure out how to monitor user input.

I have the user typing in a textbox where I fire a method on the text
changes event but this fires on every letter and it fies mant times if the
user types a long string - I 'd rather just run my method when the user is
done or if user pauses

What is the best way to use a timer or thread to check the textbox to see if
the user is still typing or done ???

Thanks
 
sippyuconn said:
I have the user typing in a textbox where I fire a method on the text
changes event but this fires on every letter and it fies mant times if the
user types a long string - I 'd rather just run my method when the user is
done or if user pauses

What is the best way to use a timer or thread to check the textbox to see if
the user is still typing or done ???

How long a pause constitutes "done"?

It seems like the easiest thing would be to have a Forms.Timer instance
that you simply reset each time the user types something. If the timer
ever actually expires and raises its event, then you do your processing.

The shorter your interval for the timer, the more likely you'll run into
situations where the user wasn't really done but you ran the processing
anyway. You'll have to balance that issue (corrected by lengthening the
timer) with the need to run the processing without excessive delay (if
that's a need you have).

Pete
 
sippyuconn said:
Hi

I am trying to figure out how to monitor user input.

I have the user typing in a textbox where I fire a method on the text
changes event but this fires on every letter and it fies mant times if the
user types a long string - I 'd rather just run my method when the user is
done or if user pauses

What is the best way to use a timer or thread to check the textbox to see if
the user is still typing or done ???

Thanks
 
sippyuconn said:
Hi

I am trying to figure out how to monitor user input.

I have the user typing in a textbox where I fire a method on the text
changes event but this fires on every letter and it fies mant times if the
user types a long string - I 'd rather just run my method when the user is
done or if user pauses

What is the best way to use a timer or thread to check the textbox to see if
the user is still typing or done ???

Thanks

Would you be able to use the textbox's Validating event? This event is fired
when the textbox loses focus. If you need to run your method when the user
pauses, however, Peter's solution sounds much better.
 
Hi,

Have you reviewed all the community member's replies to you? Do they make
sense to you? If you still need any help, please feel free to feedback,
thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top