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
Solved

why not beep?

Posted on 2000-02-25
5
224 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
  • 3
5 Comments
 
LVL 6

Accepted Solution

by:
edey earned 100 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

840 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