Hola,
Sabria deirme alguien si existe una clase o funcion en FWH para menejar el calendario.
Saludos,
alfonso wrote:Hola,
Sabria deirme alguien si existe una clase o funcion en FWH para menejar el calendario.
Saludos,
#Include "Fivewin.ch"
#Include "Dtpicker.ch"
FUNCTION MAIN()
SET DATE TO FRENCH
SET CENTURY On
SET EPOCH TO 1961
Recursos()
Codigo()
RETURN NIL
FUNCTION Recursos()
LOCAL oDlg, oGet, lChg:=.F.
LOCAL aRec, dDate:=Date()
DEFINE DIALOG oDlg RESOURCE "SET_DATE" TITLE "DTPicker desde Recursos"
REDEFINE DTPICKER oGet VAR dDate ID 10 OF oDlg ON CHANGE oGet:Refresh()
REDEFINE BUTTON ID 20 OF oDlg ACTION (lChg:=.T.,oDlg:End())
REDEFINE BUTTON ID 30 OF oDlg ACTION (lChg:=.F.,oDlg:End()) CANCEL
ACTIVATE DIALOG oDlg
IF lChg
//SetDate(Day(dDate),Month(dDate),Year(dDate))
MsgAlert(dDate)
ENDIF
RETURN NIL
FUNCTION Codigo()
local oWnd, oSay
local dDate := Date()
SET DATE TO FRENCH
SET CENTURY ON
SET EPOCH TO 1960
DEFINE WINDOW oWnd TITLE "DTPicker desde Código ...."
@ 3, 30 SAY oSay PROMPT "Fecha: "+ Dtoc( dDate ) OF oWnd SIZE 200, 20
@ 2, 2 DTPICKER dDate OF oWnd ON CHANGE oSay:Refresh()
ACTIVATE WINDOW oWnd
return NIL
-------------------------
El archivo .rc:
---------------
1 24 "wxp.man"
SET_DATE DIALOG 18, 37, 201, 108
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Datos:"
FONT 8, "MS Sans Serif"
{
PUSHBUTTON "&Aceptar", 20, 42, 69, 48, 13
PUSHBUTTON "&Cancelar", 30, 112, 69, 46, 13
CONTROL "", 10, "SysDateTimePick32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 60, 27, 81, 14
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 59 guests