Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 12th, 2004, 05:46 AM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to creative_eye
Default calculate value on Lost Focus of text field

Hi there,

I have three text boxes on the form. First is for the total amount (that is the total due amount for the client), enter by the user. Second text box is for to enter the value (payment) which user pays. In the third text box i want the calculate value (i.e total value - current value entered) on the Lost Focus event of second text box.

Plz guide me in this.

Reply With Quote
  #2 (permalink)  
Old April 12th, 2004, 08:35 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Put this in your LostFocus event for text box 2:

Text3Name.Text = cint(Text1Name.Text)-cint(Text2Name.Text)

Replace the "TextName" with the names of your text boxes. Also, you will probably want to do validation to make sure they are numbers.

J
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost Focus of Dynamic Textfield dpkbahuguna Beginning VB 6 8 November 27th, 2007 01:03 AM
Form lost focus color change dthrun VB How-To 1 March 30th, 2007 10:41 PM
Tell me following problem of lost focus amit_mande@yahoo.com VB.NET 2002/2003 Basics 1 November 13th, 2006 12:42 PM
Move focus to field without selecting text echovue Access VBA 1 April 12th, 2006 01:52 AM
Focus on a text input field fizzerchris Classic ASP Basics 0 December 16th, 2005 09:20 PM



All times are GMT -4. The time now is 06:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.