Click here to Skip to main content
15,884,298 members
Home / Discussions / C#
   

C#

 
GeneralRe: C # + Regex help (for a newbie) Pin
OriginalGriff27-Dec-17 6:28
mveOriginalGriff27-Dec-17 6:28 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz27-Dec-17 6:18
Damian Bz27-Dec-17 6:18 
GeneralRe: C # + Regex help (for a newbie) Pin
OriginalGriff27-Dec-17 6:26
mveOriginalGriff27-Dec-17 6:26 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz27-Dec-17 6:29
Damian Bz27-Dec-17 6:29 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz27-Dec-17 7:37
Damian Bz27-Dec-17 7:37 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz27-Dec-17 9:15
Damian Bz27-Dec-17 9:15 
GeneralRe: C # + Regex help (for a newbie) Pin
Richard MacCutchan27-Dec-17 21:56
mveRichard MacCutchan27-Dec-17 21:56 
GeneralRe: C # + Regex help (for a newbie) Pin
OriginalGriff28-Dec-17 1:51
mveOriginalGriff28-Dec-17 1:51 
That's a problem with your UI, rather than the code: it will happen like that whatever you do to validate, particularly if you validate in the TextChanged event and use MessageBoxes.

A better approach might be the way some website registration pages do it: a label beside the textbox (with foreground colour Red) that you put error messages into instead of using message boxes.
That way, the user can see the problem without being interrupted all the time.

When you do the conversion, store the results in class level private variables, and just execute the code:
nicshotsize.Text = (totalSize - shortFillSize).ToString();


Or better: don't use two TextBoxes at all, but NumericUpDowns instead - which won't let him enter "bad data" so it doesn't need validation.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz28-Dec-17 6:59
Damian Bz28-Dec-17 6:59 
AnswerRe: C # + Regex help (for a newbie) Pin
Gerry Schmitz28-Dec-17 8:17
mveGerry Schmitz28-Dec-17 8:17 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz28-Dec-17 23:21
Damian Bz28-Dec-17 23:21 
GeneralRe: C # + Regex help (for a newbie) Pin
Damian Bz29-Dec-17 1:48
Damian Bz29-Dec-17 1:48 
GeneralRe: C # + Regex help (for a newbie) Pin
Gerry Schmitz29-Dec-17 6:03
mveGerry Schmitz29-Dec-17 6:03 
QuestionSet datagrid cell value individually and dynamically Pin
Hervend26-Dec-17 22:17
Hervend26-Dec-17 22:17 
AnswerRe: Set datagrid cell value individually and dynamically Pin
Richard MacCutchan26-Dec-17 22:37
mveRichard MacCutchan26-Dec-17 22:37 
GeneralRe: Set datagrid cell value individually and dynamically Pin
Hervend26-Dec-17 22:52
Hervend26-Dec-17 22:52 
GeneralRe: Set datagrid cell value individually and dynamically Pin
Pete O'Hanlon26-Dec-17 22:56
mvePete O'Hanlon26-Dec-17 22:56 
GeneralRe: Set datagrid cell value individually and dynamically Pin
Hervend26-Dec-17 23:37
Hervend26-Dec-17 23:37 
GeneralRe: Set datagrid cell value individually and dynamically Pin
Richard MacCutchan26-Dec-17 23:29
mveRichard MacCutchan26-Dec-17 23:29 
GeneralRe: Set datagrid cell value individually and dynamically Pin
Hervend26-Dec-17 23:35
Hervend26-Dec-17 23:35 
QuestionParentheses vs curly brackets Pin
User9874326-Dec-17 12:17
professionalUser9874326-Dec-17 12:17 
AnswerRe: Parentheses vs curly brackets Pin
Gerry Schmitz26-Dec-17 12:36
mveGerry Schmitz26-Dec-17 12:36 
GeneralRe: Parentheses vs curly brackets Pin
User9874326-Dec-17 12:54
professionalUser9874326-Dec-17 12:54 
GeneralRe: Parentheses vs curly brackets Pin
Gerry Schmitz26-Dec-17 12:57
mveGerry Schmitz26-Dec-17 12:57 
GeneralRe: Parentheses vs curly brackets Pin
User9874326-Dec-17 15:00
professionalUser9874326-Dec-17 15:00 

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.