Solved

Working in background

Posted on 1998-07-23
4
167 Views
Last Modified: 2010-04-04
How can I make program that work in background? I want to make program that save the time when Windows is starting, write it on the screen, and after that, in evry moment, write curent time and distance between that two times?
How to do this?
0
Comment
Question by:mmilan
  • 2
4 Comments
 
LVL 3

Expert Comment

by:Matvey
ID: 1358580
For your program to work in background you can make just a normal program that gets the time every second, makes the calculations you want etc. The only thing your program will need is to be unvisible in the taskbar and start when windows starts.

You can use this component to make it start when windows starts:
http://bes.trendline.co.il/torry/vcl/system/amarun.zip

And you can use these components to hide the button on taskbar:
http://bes.trendline.co.il/torry/vcl/system/appvisib.zip
http://bes.trendline.co.il/torry/vcl/system/thidetask.zip
http://bes.trendline.co.il/torry/vcl/system/notask.zip
0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1358581
mmilan

when you say write it on the screen you mean the desktop or a form you've created...

Later
BoRiS
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1358582
Ahh, forgot to mention. When your program starts, get the time by calling Then := Now. Then every second calculate Differ := Now-Then, and display it using TimeTostr(Differ)...

From Boris'es comment - maybe it's a good idea to use Screen.Canvas.TextOut(TimeToStr(Differ)) (??not sure it'll work, but a good idea)
0
 

Accepted Solution

by:
ShadowHawk071998 earned 10 total points
ID: 1358583
You also need to use the Timer of course.This is the component that allows you to 'go to
sleep' and only wake at certain 'intervals' (Like 1 second. EVery second is 1000 in the interval property). It's dead simple to use, it has one event (WHen the timer finished counting back).
good luck...
0

Featured Post

Industry Leaders: 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

Title # Comments Views Activity
DBCtrlGrid, Delphi, Scroll 8 60
Problem working with dynamic array - help 2 36
Way to create an iPhone app for my customers 8 50
Using MMsystem To change audio input 1 21
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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

697 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