- Code: Select all Expand view RUN
#include "dtpicker.ch"
STATIC FUNCTION PRENOTAZIONE( oBtn )
LOCAL oDlg, lReg:=.F.
LOCAL cCustomer :=Space(40),oCustomer
LOCAL oFont1,aOra,aVar:= Hora()
DEFINE DIALOG oDlg ;
FROM 317, 412 TO 475, 732 PIXEL ;
TITLE "Prenotazione!"
@ 1, 2 SAY " Sig./ra : " OF oDlg
@ 1.3, 6 GET oCustomer VAR cCustomer OF oDlg SIZE 100, 10 VALID ! Empty(cCustomer)picture "@!"
@ 2.6, 6 SAY "Alle ore : " OF oDlg
@ 2, 12 TMPicker aOra Var aVar SIZE 40, 10 Update of oDlg
@ 3, 7 BUTTON "&Conferma" OF oDlg SIZE 30, 12 ACTION(lReg:=.T., oDlg:End())
@ 3, 16 BUTTON "&Annula" OF oDlg SIZE 30, 12 ACTION(lReg:=.F., oDlg:End()) CANCEL
ACTIVATE DIALOG oDlg
return nil
STATIC FUNCTION Hora()
local nAux, nMin, nHor, nSec, cMin, cHor, cSec
nSec := Seconds()
nAux := Int(nSec) / 3600
nHor := Int(nAux)
nAux := (nAux - nHor) * 60
nMin := Int(nAux)
nSec := Int( (nAux - nMin) * 60 )
cHor := Padl( alltrim(str(nHor)), 2, '0')
cMin := Padl( alltrim(str(nMin)), 2, '0')
cSec := Padl( alltrim(str(nSec)), 2, '0')
return cHor + cMin + cSec
it open a calendar instead of time select
why in tmpicker I see only datepicker ?