//https://github.com/maxkleiner/maXbox3/blob/masterbox2/examples/469_formarrow_datepicker.txt Program Demo_App_mX_cALwON_Arrow_Result; { **************************************************************** Sourcefile : DBopen.PAS Typ : WinForm-Unit Engineer : MK max@kleiner.ch First Release : 10.01.1997 Compiler : maXbox: DevC+Delphi, OS: W7 Purpose : Let a user to pick a date Revisions : 25.10.96 first dialog to open a date :#sign:review: EUSE01WKSNEC001: 30.06.2014 13:42:57 : 23.04.2014 migrate to maXbox - #locs:61 **************************************************************** } type TdbOpenDlg = TForm; //var //BeginDate: TDateTime; //dbOpenDlg: TdbOpenDlg; //brDateForm: TDateTimePicker; //TJvPickdate; procedure TDlg_Button1Click(Sender: TObject); begin TForm(TBitBtn(sender).parent).ModalResult:= mrOK; end; procedure TDlg_CalBtnFromClick(Sender: TObject); var BeginDate: TDateTime; dbOpenDlg: TdbOpenDlg; begin dbOpenDlg:= TdbOpenDlg.Create(self) with dbOpenDlg do begin setBounds(0,0,400,400) brush.style:= bsdiagCross end; with TBitBtn.Create(dbopenDlg) do begin parent:= dbopenDlg; setBounds(20,300,150,40) caption:= 'OK Date'; glyph.LoadFromRes(getHINSTANCE,'TPSIMPORT_COMOBJ'); onClick:= @TDlg_Button1Click; end; try with TDateTimePicker.Create(dbopenDlg) do begin parent:= dbopenDlg; SetBounds(20,20,100,100); if dbOpenDlg.showModal = mrOK then beginDate:= Datetime; writeln('date back time: '+dateTimetoStr(Datetime)); end; finally dbopenDlg.Release; //or free Voice('You set the date '+datetoStr(begindate)); end; end; begin //main TDlg_CalBtnFromClick(self); //Voice('You set the date '+datetoStr(begindate)); end. ----------------------------------------------------- Doc: Status API: The Date and Time Picker is a control that allows the user to select either a date or a time value. This control provides two objects in one: A picker and a calendar Training: http://www.functionx.com/bcb/controls/datetime.htm Blog About http://www.softwareschule.ch/examples/469_ibzresult.txt //ToDo: Eliminate the Global Vars! © 2014 GitHub, Inc. Terms Privacy Security Contact Anforderung: Ein Datum ist zu wählen und nach Bestätigung zu hören. Aufgabe: Alles unnötige ist auszukommentieren und nötiges zu vereinfachen. first date: 14.6.2014 S. 251 - 268 im C++ Buch Aufräumarbeiten S. 11 -Skript UML Use Case Tool: mX Musterlösung 469_formarrow_datepicker_ibz.txt