,,,
: Label1 Timer1. Object Inspector Timer1 Interval 1000 . Timer1Timer :
Label1->Caption = Now(); //
Now() , Now . . . . , Label1. , Label1 Caption . , Timer1 Interval, , 10 .
DateToStr(dt) TimeToStr(dt). DateToStr(dt) , dd.mm.yyyy (, , ). TimeToStr(dt) , hh:mm:ss (, , ). Label1, Label2 Timer1. Timer1Timer :
Label1->Caption = DateToStr(Now()); //
Label2->Caption = TimeToStr(Now()); //
:
Label1->Caption = Date(); //
Label2->Caption = Time(); //
DayOfWeek() ( ) , , . 1 , 2 . DayOfWeek(). Label3 :
Label3->Caption = DayOfWeek(Now()); //
, 4, . , , :
//
if (DayOfWeek(Now()) == 1) Label3->Caption = ;
if (DayOfWeek(Now()) == 2) Label3->Caption = ;
if (DayOfWeek(Now()) == 3) Label3->Caption = ;
if (DayOfWeek(Now()) == 4) Label3->Caption = ;
if (DayOfWeek(Now()) == 5) Label3->Caption = ;
if (DayOfWeek(Now()) == 6) Label3->Caption = ;
if (DayOfWeek(Now()) == 7) Label3->Caption = ;
. .
, . . FormKeyDown ( ) :
// <A>
// 440 ( ) 0,2
if (Key == 'A') Beep(440,200);
// <>
if (Key == ' ') Form1->Color = clRed;
if (Key == 27) Close(); // <Esc>
. . :
if (Key == 'A') Beep(440,200);
-, 65 :
if (Key == 65) Beep(440,200);
. , . . FormKeyDown :
Label1->Caption = Key; //
. <A> 65, <S> 83, <Enter> 13 . . . Label1 Caption . EXE-. .
Windows. . , FormMouseDown ( ) :
Close(); //
, , . FormKeyDown :
if (Key = '*') Close(); //
* . .
, . WindowState ( ) Form1 wsMaximized ( ), BorderStyle ( ) bsNone ( ). , .
. , , . , . , , , . , . , . , . , , . , . , .
- , , EXE SCR. WindowsSystem32. , , , .
Copyright (c) 2024 Stud-Baza.ru , , , .