?
Solved

why not beep?

Posted on 2000-02-25
5
Medium Priority
?
228 Views
Last Modified: 2010-04-04
Why not beep when I select today

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ComCtrls, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    DateTimePicker1: TDateTimePicker;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);

  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
if date=DateTimePicker1.date then beep;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
close;
end;


end.
0
Comment
Question by:chiro
[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
  • 3
5 Comments
 
LVL 6

Accepted Solution

by:
edey earned 400 total points
ID: 2559107
TDateTimePicker.date returns that value of the date& time, try:

if date=trunc(DateTimePicker1.date) then beep;


GL
Mike


0
 
LVL 3

Expert Comment

by:ckaneta
ID: 2559223
my computer doesn't beep at all, but when I typecast them both to strings it showed a 'beep' message;

if datetotstr(date)=datetostr(DateTimePicker1.date) then showmessage('beep');
0
 
LVL 6

Expert Comment

by:edey
ID: 2559472
I'm a little confused

Will it beep if you tell it too unconditionaly?

GL
Mike
0
 

Author Comment

by:chiro
ID: 2559587
thank
0
 
LVL 6

Expert Comment

by:edey
ID: 2559679
Glad to be of service :)


Gl
Mike
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month10 days, 6 hours left to enroll

765 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