Solved

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

Posted on 1997-12-21
1
164 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

756 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