Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / October 2007

Tip: Looking for answers? Try searching our database.

Thread monitor user input

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sippyuconn - 10 Oct 2007 14:10 GMT
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
Peter Duniho - 10 Oct 2007 18:16 GMT
> 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
[quoted text clipped - 3 lines]
> 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
shooby - 10 Oct 2007 18:25 GMT
> Hi
>
[quoted text clipped - 9 lines]
>
> Thanks
shooby - 10 Oct 2007 18:42 GMT
> Hi
>
[quoted text clipped - 9 lines]
>
> 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.
Jeffrey Tan[MSFT] - 15 Oct 2007 10:43 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.