Click here to Skip to main content
15,898,373 members
Home / Discussions / C#
   

C#

 
QuestionC# and Excel Pin
prithaa20-May-10 17:57
prithaa20-May-10 17:57 
AnswerRe: C# and Excel Pin
Garth J Lancaster20-May-10 18:26
professionalGarth J Lancaster20-May-10 18:26 
AnswerRe: C# and Excel Pin
RCoate20-May-10 19:20
RCoate20-May-10 19:20 
AnswerRe: C# and Excel Pin
Abhinav S20-May-10 20:53
Abhinav S20-May-10 20:53 
AnswerRe: C# and Excel Pin
Anas Abbas20-May-10 23:53
Anas Abbas20-May-10 23:53 
QuestionHow Do I Handle A Textbox Change Correctly? Pin
Roger Wright20-May-10 16:23
professionalRoger Wright20-May-10 16:23 
AnswerRe: How Do I Handle A Textbox Change Correctly? Pin
Dr.Walt Fair, PE20-May-10 16:57
professionalDr.Walt Fair, PE20-May-10 16:57 
AnswerRe: How Do I Handle A Textbox Change Correctly? Pin
Luc Pattyn20-May-10 17:25
sitebuilderLuc Pattyn20-May-10 17:25 
the normal thing to do, most of the time, is to have one or more input controls that gather input parameters, but don't launch anything major; and a launch control, say a Button. So the user basically says very explicitly "I'm done, now you compute".

you can try without in simple cases, when (almost) all conceivable input values can be handled; this seldom includes the input of floating-point numbers, as you discovered.

one alternative is to use a time-out, i.e. a timer which gets reset and launched on every key stroke/mouse click into the input controls; when the timer fires, no parameter change has been applied for the last N milliseconds, so the input phase is assumed to be finished, and the compute phase is started automatically.

and then you could rely on a special key, say the ENTER key. That takes a little KeyDown handler, as you well know by now. It may be tricky to get comfortable with that solution when more than one TextBox is involved though.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read formatted code with indentation, so please use PRE tags for code snippets.

I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).

GeneralRe: How Do I Handle A Textbox Change Correctly? Pin
Roger Wright20-May-10 17:52
professionalRoger Wright20-May-10 17:52 
GeneralRe: How Do I Handle A Textbox Change Correctly? Pin
Luc Pattyn20-May-10 17:56
sitebuilderLuc Pattyn20-May-10 17:56 
AnswerRe: How Do I Handle A Textbox Change Correctly? Pin
William Winner21-May-10 8:15
William Winner21-May-10 8:15 
GeneralRe: How Do I Handle A Textbox Change Correctly? Pin
Peter_in_278023-May-10 14:37
professionalPeter_in_278023-May-10 14:37 
AnswerRe: How Do I Handle A Textbox Change Correctly? Pin
Peter_in_278023-May-10 14:40
professionalPeter_in_278023-May-10 14:40 
QuestionWinForms App Only Runs When Pressing F5 (Start Debugging) :: VS2008 & .NET 3.5 Pin
Matt U.20-May-10 11:54
Matt U.20-May-10 11:54 
AnswerRe: WinForms App Only Runs When Pressing F5 (Start Debugging) :: VS2008 & .NET 3.5 Pin
Luc Pattyn20-May-10 12:11
sitebuilderLuc Pattyn20-May-10 12:11 
GeneralRe: WinForms App Only Runs When Pressing F5 (Start Debugging) :: VS2008 & .NET 3.5 Pin
Matt U.20-May-10 13:12
Matt U.20-May-10 13:12 
GeneralRe: WinForms App Only Runs When Pressing F5 (Start Debugging) :: VS2008 & .NET 3.5 Pin
Luc Pattyn20-May-10 13:34
sitebuilderLuc Pattyn20-May-10 13:34 
GeneralRe: WinForms App Only Runs When Pressing F5 (Start Debugging) :: VS2008 & .NET 3.5 Pin
Matt U.20-May-10 14:48
Matt U.20-May-10 14:48 
GeneralRe: WinForms App Only Runs When Pressing F5 (Start Debugging) :: VS2008 & .NET 3.5 Pin
Luc Pattyn20-May-10 14:56
sitebuilderLuc Pattyn20-May-10 14:56 
GeneralRe: WinForms App Only Runs When Pressing F5 (Start Debugging) :: VS2008 & .NET 3.5 Pin
Matt U.20-May-10 14:59
Matt U.20-May-10 14:59 
GeneralRe: WinForms App Only Runs When Pressing F5 (Start Debugging) :: VS2008 & .NET 3.5 Pin
Matt U.20-May-10 15:13
Matt U.20-May-10 15:13 
GeneralRe: WinForms App Only Runs When Pressing F5 (Start Debugging) :: VS2008 & .NET 3.5 Pin
Luc Pattyn20-May-10 15:25
sitebuilderLuc Pattyn20-May-10 15:25 
GeneralRe: WinForms App Only Runs When Pressing F5 (Start Debugging) :: VS2008 & .NET 3.5 Pin
Matt U.20-May-10 15:29
Matt U.20-May-10 15:29 
GeneralRe: WinForms App Only Runs When Pressing F5 (Start Debugging) :: VS2008 & .NET 3.5 Pin
Luc Pattyn20-May-10 15:44
sitebuilderLuc Pattyn20-May-10 15:44 
GeneralRe: WinForms App Only Runs When Pressing F5 (Start Debugging) :: VS2008 & .NET 3.5 Pin
Matt U.20-May-10 15:55
Matt U.20-May-10 15:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.