Solved

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

Posted on 1997-12-21
1
155 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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 this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

785 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