Alarm clock in Borland C++ builder

Alarm clock in Borland C++ builder

Page 1 of 1

4 Replies - 8713 Views - Last Post: 07 January 2010 - 11:14 AM Rate Topic: -----

#1 maximilian  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 13-June 09

Alarm clock in Borland C++ builder

Post icon  Posted 07 January 2010 - 05:32 AM

Hello guys

Do you know if there is some library in Borland C++ builder containing this type of functions? I mean, functions manipulating with the timer of the computer. I want to make a program that will work in the background, and when you set the time, for example at 10:00 PM, and then a form appears on the screen reminding you about something.

Is there any library like this? I know in Dev C++ there was a library called ctime, and it was something like this.

Thanks in advance :)

Is This A Good Question/Topic? 0
  • +

Replies To: Alarm clock in Borland C++ builder

#2 anonymouscodder  Icon User is offline

  • member icon

Reputation: 126
  • View blog
  • Posts: 710
  • Joined: 01-January 10

Re: Alarm clock in Borland C++ builder

Posted 07 January 2010 - 06:09 AM

The library time.h is part of the C standard library, it's not something exclusive of Dev C++.

The usage of C libraries with C++ it's like ctime instead of time.h, cstdio instead of stdio.h, and so on.
Was This Post Helpful? 0
  • +
  • -

#3 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Alarm clock in Borland C++ builder

Posted 07 January 2010 - 07:42 AM

Windows has Timers and WaitableTimers (the latter I just found on MSDN so I don't know anything about really).

Since these are part of the windows API you should have access to them.

Borland Builder also uses VCL (which is surprisingly poorly documented) and I seem to remember that it too has a timer...
Was This Post Helpful? 0
  • +
  • -

#4 UG Cyber  Icon User is offline

  • D.I.C Addict

Reputation: 32
  • View blog
  • Posts: 551
  • Joined: 24-July 08

Re: Alarm clock in Borland C++ builder

Posted 07 January 2010 - 08:22 AM

as far as running it in the background, find the HWND to your window, then hide it ( ShowWindow(WindowHandle, false) ). Your task is really quite simple
Was This Post Helpful? 0
  • +
  • -

#5 #define  Icon User is offline

  • Duke of Err
  • member icon

Reputation: 1335
  • View blog
  • Posts: 4,575
  • Joined: 19-February 09

Re: Alarm clock in Borland C++ builder

Posted 07 January 2010 - 11:14 AM

View PostNickDMax, on 7 Jan, 2010 - 03:42 PM, said:

Since these are part of the windows API you should have access to them.

Borland Builder also uses VCL (which is surprisingly poorly documented) and I seem to remember that it too has a timer...


Yes NickDMax is right, Borland C++ Builder has a Timer Component,
(TTimer) under the System tab.
It uses the Windows API and produces OnTimer events.

Description: TTimer encapsulates the Windows API timer functions.

It uses an interval (of time), so you would have to calculate the interval
to your alarm.

TForm has Active and Visible properties, to allow you to run
the program in the background.

Checked under BCB6.

Borland
C++Builder
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1