TTimer problem Cardinal vs Integer

Posted on 2006-05-30
Last Modified: 2010-04-05
I Have a TTimer component on a form and a field that the user types in the number of minutes delay required.  I wanted to have the line

Timer2.Interval := EDelay.Value * 1000;

but I get the error message 'Incompatible types: 'Cardinal' and 'Real'

How do I cast what as what to get the desired result?


Question by:jdthedj
    LVL 7

    Accepted Solution

    What is EDalay.  It appears that EDalay.Value is a cardinal.  Try to use

    Timer2.Interval := Trunc(EDelay.Timer) * 1000;
    LVL 3

    Author Comment

    Thanks Kyle - that works fine!


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
    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…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    758 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

    13 Experts available now in Live!

    Get 1:1 Help Now