Click here to Skip to main content
15,914,351 members
Home / Discussions / C#
   

C#

 
GeneralRe: Expressions(calculations) Pin
sreejith ss nair24-May-04 19:20
sreejith ss nair24-May-04 19:20 
GeneralRe: Expressions(calculations) Pin
stevemasters2224-May-04 19:34
stevemasters2224-May-04 19:34 
GeneralRe: Expressions(calculations) Pin
sreejith ss nair24-May-04 19:54
sreejith ss nair24-May-04 19:54 
GeneralRe: Expressions(calculations) Pin
Stefan Troschuetz24-May-04 21:16
Stefan Troschuetz24-May-04 21:16 
GeneralRe: Expressions(calculations) Pin
sreejith ss nair24-May-04 22:07
sreejith ss nair24-May-04 22:07 
GeneralRe: Expressions(calculations) Pin
Stefan Troschuetz24-May-04 22:38
Stefan Troschuetz24-May-04 22:38 
GeneralRe: Expressions(calculations) Pin
stevemasters2225-May-04 17:09
stevemasters2225-May-04 17:09 
GeneralRe: Expressions(calculations) Pin
Dave Kreskowiak25-May-04 17:24
mveDave Kreskowiak25-May-04 17:24 
The problem is your using the TextChanged event of TextBox3. Don't...don't use TextBox3 events to fire off the calculation. What you should be doing is performing the calculation on the Leave or LostFocus events of the other two TextBoxes. With a little modification to the TextBox properties, you could even use the Validating event. In any case, when you hanlde any of these events, you can do some validation on Textbox1 and Textbox2 so you can make sure that your not trying to add '100 + whoknowswhat'. Then all you do is Total = Decimal.Parse(Textbox1.Text) + Decimal.Parse(Textbox2.Text), then Textbox3.Text = Total.ToString().


RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: Expressions(calculations) Pin
stevemasters2225-May-04 17:46
stevemasters2225-May-04 17:46 
GeneralRe: Expressions(calculations) Pin
Dave Kreskowiak26-May-04 0:46
mveDave Kreskowiak26-May-04 0:46 
GeneralRe: Expressions(calculations) [EDITED} Pin
Dave Kreskowiak26-May-04 3:35
mveDave Kreskowiak26-May-04 3:35 
GeneralRe: Expressions(calculations) Pin
Stefan Troschuetz25-May-04 21:25
Stefan Troschuetz25-May-04 21:25 
GeneralExpressions Pin
Anonymous24-May-04 18:37
Anonymous24-May-04 18:37 
GeneralRe: Expressions Pin
sreejith ss nair24-May-04 20:03
sreejith ss nair24-May-04 20:03 
GeneralRe: Expressions Pin
sreejith ss nair24-May-04 20:03
sreejith ss nair24-May-04 20:03 
GeneralRe: Expressions Pin
Dave Kreskowiak25-May-04 0:35
mveDave Kreskowiak25-May-04 0:35 
Generalhelp! Pin
agu989924-May-04 18:14
agu989924-May-04 18:14 
GeneralRe: help! Pin
Heath Stewart25-May-04 2:44
protectorHeath Stewart25-May-04 2:44 
GeneralEnable/Disable of texbox Pin
HappyKim24-May-04 15:56
HappyKim24-May-04 15:56 
GeneralRe: Enable/Disable of texbox Pin
Dave Kreskowiak24-May-04 16:58
mveDave Kreskowiak24-May-04 16:58 
GeneralRe: Enable/Disable of texbox Pin
sreejith ss nair24-May-04 20:02
sreejith ss nair24-May-04 20:02 
GeneralRe: Enable/Disable of texbox Pin
HappyKim25-May-04 15:41
HappyKim25-May-04 15:41 
GeneralRe: Enable/Disable of texbox Pin
sreejith ss nair26-May-04 20:51
sreejith ss nair26-May-04 20:51 
GeneralRe: Enable/Disable of texbox Pin
HappyKim27-May-04 14:01
HappyKim27-May-04 14:01 
GeneralRe: Enable/Disable of texbox Pin
sreejith ss nair27-May-04 17:51
sreejith ss nair27-May-04 17:51 

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.