Click here to Skip to main content
12,826,151 members (31,183 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# Windows Application
Hi ,


I know the coding of two text box values and retrieve it in third text box.

But,

My Question is ,

First Text box:5

Second text box:5

Third text box =10 while entering the first text box value and second text box value, third text box should show the sum of result in 3rd text box automatically.

It should be automatic pop up

Am doing my proj in Windows application, please post the commands related c#.


Help me

Thanks

Uma
Posted 14-Dec-12 19:12pm
Updated 1-Apr-16 23:35pm
Comments
adriancs 15-Dec-12 0:25am
   
What have you tried?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Hi,

You can use Textbox Changed event[^]

you need to bind event for both the textbox and make sure if the textbox value is empty then consider it as zero.

Hope you can do it very quickly.

Best luck.
  Permalink  
Comments
Mohamed Mitwalli 15-Dec-12 0:31am
   
Hi Amit this will occurred every time he is enter number like if he enter 12345 will occurred 5 times
@AmitGajjar 15-Dec-12 0:33am
   
Yes, as he said that he need to populate value when he is entering the value in either first or second text box.
@AmitGajjar 15-Dec-12 0:33am
   
He do not want it at the time of leave the textbox.
Mohamed Mitwalli 15-Dec-12 0:39am
   
Well take my +5
@AmitGajjar 15-Dec-12 0:42am
   
Thanks for the 5, Lets wait for response from OP.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Hi ,
Check this
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.leave.aspx[^]
textBox1_Leave do your calculation in this event

Best Regards
M.Mitwalli
  Permalink  
Comments
@AmitGajjar 15-Dec-12 0:42am
   
would you like to change your answer ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170326.1 | Last Updated 22 Apr 2016
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100