** END HEADER -- do not remove this line // // Generated on 2020-11-14 // parameter bModal local f f = new durationForm() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif class durationForm of FORM with (this) onOpen = class::FORM_ONOPEN height = 9.5455 left = 124.4286 top = 4.4091 width = 48.5714 text = "" endwith this.PB1 = new PUSHBUTTON(this) with (this.PB1) onClick = class::PB1_ONCLICK height = 1.0909 left = 5.0 top = 2.2727 width = 15.2857 text = "Client In" endwith this.TIME1EF = new ENTRYFIELD(this) with (this.TIME1EF) height = 1.0 left = 22.0 top = 2.1818 width = 12.1429 function = "I" value = "" endwith this.PB2 = new PUSHBUTTON(this) with (this.PB2) onClick = class::PB2_ONCLICK height = 1.0909 left = 5.0 top = 4.5455 width = 15.2857 text = "Client Out" endwith this.TIME2EF = new ENTRYFIELD(this) with (this.TIME2EF) height = 1.0 left = 22.0 top = 4.5455 width = 12.1429 function = "I" value = "" endwith this.TEXT1 = new TEXT(this) with (this.TEXT1) height = 1.0 left = 5.0 top = 6.3636 width = 15.0 text = "Duration In (Mins)" endwith this.DURATIONEF = new ENTRYFIELD(this) with (this.DURATIONEF) height = 1.0909 left = 22.0 top = 6.0 width = 12.0 value = "" endwith function PB1_onClick() form.time1ef.value = substr(time(),1,5) form.time2ef.value = '' form.durationef.value = '' return function PB2_onClick() local duration,duration_mins form.time2ef.value = substr(time(),1,5) //this time() is dBASE function i.e not from time.cc duration = form.time.difftime(form.time1ef.value,form.time2ef.value) duration_mins = int(form.time.time2sec(duration)/60) form.durationef.value = iif(duration_mins = 0,1,duration_mins) //never display 0. Minimum time is 1 minute return function form_onOpen() set procedure to:duflp:time.cc form.time = new time() // this time() is creating an instance of the class in time.cc return endclass