Click here to Skip to main content
15,921,028 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralSenthil'S reply for numeric textbox Pin
Senthil S9-Aug-07 2:03
Senthil S9-Aug-07 2:03 
GeneralRe: Senthil'S reply for numeric textbox Pin
Salman Sheikh9-Aug-07 2:45
Salman Sheikh9-Aug-07 2:45 
AnswerRe: numeric textbox Pin
The ANZAC9-Aug-07 0:23
The ANZAC9-Aug-07 0:23 
AnswerRe: numeric textbox Pin
The ANZAC9-Aug-07 0:26
The ANZAC9-Aug-07 0:26 
GeneralRe: numeric textbox Pin
Christian Graus9-Aug-07 0:50
protectorChristian Graus9-Aug-07 0:50 
GeneralRe: numeric textbox Pin
The ANZAC9-Aug-07 1:26
The ANZAC9-Aug-07 1:26 
AnswerRe: numeric textbox Pin
The ANZAC9-Aug-07 1:36
The ANZAC9-Aug-07 1:36 
GeneralRe: numeric textbox Pin
Luc Pattyn9-Aug-07 1:54
sitebuilderLuc Pattyn9-Aug-07 1:54 
That is still not exact for several reasons:
- you may have different symbols for decimal point (see regional settings);
- you may want to allow a plus sign;
- you may want to allow thousands separators;
- you may want to allow floating-point notation as in -1,234,567e-23

My conclusion is it is not really worthwhile trying to predict the result of TryParse;
except for a sole minus sign, a sole plus sign, and a partially entered floating-point
number, all partially entered valid numbers are valid numbers on their own.
So I suggest you take care of those exceptions, and work with textchanged event only.

BTW: IMO there is no need to set e.handled=false, it is false to start with.
this seems a good place if any to use multiple exits.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


GeneralRe: numeric textbox Pin
The ANZAC9-Aug-07 10:55
The ANZAC9-Aug-07 10:55 
AnswerRe: numeric textbox Pin
KernowMan9-Aug-07 2:01
KernowMan9-Aug-07 2:01 
Questiondata bindings problem Pin
Sonia Gupta8-Aug-07 22:56
Sonia Gupta8-Aug-07 22:56 
AnswerRe: data bindings problem Pin
SamRST8-Aug-07 23:21
SamRST8-Aug-07 23:21 
GeneralRe: data bindings problem Pin
Sonia Gupta8-Aug-07 23:51
Sonia Gupta8-Aug-07 23:51 
AnswerRe: data bindings problem Pin
Nilesh Hapse8-Aug-07 23:21
Nilesh Hapse8-Aug-07 23:21 
AnswerSenthil's Reply for data bindings problem Pin
Senthil S9-Aug-07 0:20
Senthil S9-Aug-07 0:20 
GeneralRe: data bindings problem Pin
Sonia Gupta8-Aug-07 23:46
Sonia Gupta8-Aug-07 23:46 
GeneralRe: data bindings problem Pin
Nilesh Hapse8-Aug-07 23:57
Nilesh Hapse8-Aug-07 23:57 
AnswerRe: data bindings problem Pin
Urs Enzler9-Aug-07 2:09
Urs Enzler9-Aug-07 2:09 
Questiongprs Pin
ahzarmokhli8-Aug-07 22:35
ahzarmokhli8-Aug-07 22:35 
AnswerRe: gprs Pin
Dave Kreskowiak9-Aug-07 3:30
mveDave Kreskowiak9-Aug-07 3:30 
QuestionProblems in Dataset Update Pin
HinJinShah8-Aug-07 22:20
HinJinShah8-Aug-07 22:20 
AnswerRe: Problems in Dataset Update Pin
Dave Kreskowiak9-Aug-07 3:30
mveDave Kreskowiak9-Aug-07 3:30 
GeneralRe: Problems in Dataset Update Pin
HinJinShah10-Aug-07 0:05
HinJinShah10-Aug-07 0:05 
QuestionForm in a Form Pin
Trupti Mehta8-Aug-07 21:51
Trupti Mehta8-Aug-07 21:51 
AnswerRe: Form in a Form Pin
MartyK20078-Aug-07 22:03
MartyK20078-Aug-07 22:03 

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.