ShowMessage (<>) . : ShowMessage ( !)
ShowMessageFmt( %d %d , [n1,n2]) n1=5 n2=7 : 5 7
, - .
MessageDlg (<>, AType, Abuttons, HelpCtx) . AType.
MtWarning | |
MtError | |
MtInformation | |
MtConfirmation | |
mtCustom |
Abuttons , .
MbYes | Yes |
MbNo | No |
MbOk | Ok |
MbCancel | Cancel |
MbHelp | Help |
MbAbort | Abort |
MbRetry | Retry |
MbIgnore | Ignore |
MbAll | All |
3 ,
MbYesNoCancel | Yes, No, Cancel |
mbOkCancel | Ok, Cancel |
mbAbortRetryIgnore | Abort, Retry, Ignore |
14
:
Begin
if MessageDlg('Yo!',mtWarning,[mbYes, mbNo],0)=mrYes
then close;
end.
:
:
1. x y , , .
2. a . 2, 5, 15, 20, 50, 100, 500$. , ?
TDateTime
Var t: TDateTime;
SysUtils :
function Date: TDataTime; - TDateTime.
function DateToStr(Date: TDateTime): string; - , Date, .
function DayOfWeek(Date: TDateTime): Integer; - , Date. 1, - 2 . .
function EncodeDate(Year, Month, Day: Word): TDateTime; - Year, Month Day TDateTime.
function DecodeDate(Date: TDateTime): Word; - TDateTime Year, Month Day.
function Now: TDateTime; - .
function StrToDate(const S; string): TDateTime; - , S, TDateTime.
function Time: TDateTime; - .
function TimeToStr(Time: TDateTime): string; - , LongTimeFormat.
|
|
TDateTimePocker /
:
CalAlignment | : dtaLeft ; dtaRight . Kind=dtkDate DateMode=dmComoBox |
CalColors | |
Checked | Checked=True ShowCheckBox=True, () . |
Date | |
DateFormat | : dfShort 11.01.04; dfLong 5 2004 . |
DateMode | : dmComboBox ; dmUpDown TUpDown |
Kind | : dtkDate ; dtkTime |
MaxDate | , |
MinDate | , |
Time |
TMonthCalendar
. , , .
:
CalColors | (, , ) |
Date | |
EndDate | |
FirstDayOfWeek | |
MaxDate | , . , |
MinDate | , . , |
ShowTodayCircle | / |
WeekNumbers | / |
TTimer
. MS-DOS, Windows 95/98/ME 55 ( ). Windows NT Server, Windows 2000, Windows XP 10 .
TCalenar
. Day, Month, Year 1 9999 .
15
, 2006, 1, 1 1.1.2006.
var MyTime: TDateTime;
begin
MyTime:= EncodeDate(2006, 1, 1);
Edit1.Text:= DateToStr(MyTime); end;
Edit1.Text:= DateToStr(Now);
:
1. .
2. 13.