Board index » delphi » Ring a bell...

Ring a bell...

Can anyone give me some insight on writing the following I would like to
write:

Program to run in background and play a (.WAV) sound at a specified time
(hr:min:sec).

While I know how to play a .WAV, and am familiar with the various time
functions etc..., I'm not sure what if anything I need to do to ensure this
app gets background time, does not get closed inadvert, etc...

It's for a timeclock application..

Any helpers ???

bba...@mcsi.net

 

Re:Ring a bell...


Quote
>   "brian" <bba...@mcsi.net> writes:
>  Program to run in background and play a (.WAV) sound at a specified time
>  (hr:min:sec).

I recently made a program where users can set it up to check several things:
1) incoming email
2) incoming material in a handful of folders on a server
3) searching for specific words in these folders
4) notifications on dates and times set by the user.

For each of these four the user can specify which wav to be played.

The check is carried out at an interval set by the user through a timer. Whenever a hit the timer uses this procedure to play the chosen wav:

procedure Talarmtt.SpelaLjudet (filnamn : String);
var

  A: array[0..79] of Char;
begin
  try
    StrPCopy(A, filnamn);
    sndPlaySound (a,SND_FILENAME);
  except
    beep;
  end;
end;

johan

Re:Ring a bell...


Quote
brian wrote:

> Can anyone give me some insight on writing the following I would like to
> write:

> Program to run in background and play a (.WAV) sound at a specified time
> (hr:min:sec).

> While I know how to play a .WAV, and am familiar with the various time
> functions etc..., I'm not sure what if anything I need to do to ensure this
> app gets background time, does not get closed inadvert, etc...

> It's for a timeclock application..

The most common way to do such things is to put them in the System Tray,
usually with a small icon but not always.  Tell 'em if they close it
they just won't get paid.  ;-)

Other Threads