Solved

How to make a number appear in a label in delphi 3

Posted on 1997-12-21
1
151 Views
Last Modified: 2010-04-04
I have a countdown timer set up but it wont countdown because 10 is not a valid string... how do i set this as integer...
0
Comment
Question by:andy7081
1 Comment
 

Accepted Solution

by:
TechStone earned 50 total points
ID: 1354337
I don't completely understand your question.  What I think you mean is you have an integer, and you want it to appear on a form in a label.

To do that, you need to convert the integer to a string.  You need to use the IntToStr function, that converts an integer to a string.  It might look something like this:

Label1.Caption := IntToStr(Count);

Where Count is the name of your count down variable, and label1 is the name of the label you want it to appear in.

To go the other direction, where you want to convert a string to an integer, you would use the StrToInt function.  For example, if you had an edit box and wanted to get  the starting number for your countdown from that, you would use a statement like:

StartNum := StrToInt(Edit1.Text);

Hope that helps...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Wininet read php file from internet issue 6 81
Path  to current project in Delphi. 2 72
Correct Component for Shopping Cart. 2 96
Delphi 2 49
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now