I am in the process of re-writing an old VB program and want to have the same functionality as the old application.
There is a Date Picker option on a date field that is blank ( ctod("00/00/00") ) .. and I want to leave it as blank, unfortunately when I use the DtPicker option by default todays date is displayed.
I am passing ctod("00/00/00") to the date picker but I can not seem to get the control to give me a blank date ?
Consider this code and see pics.
Thanks
Rick Lipkin
- Code: Select all Expand view
// DatePick Example
#include "fivewin.ch"
#include "dtpicker.ch"
//-------------------------------
FUNCTION main()
Local oDlg, dDate,oDate,oBtn1
SET CENTURY ON
dDate := ctod("00/00/00")
DEFINE DIALOG oDlg RESOURCE "TESTDP"
REDEFINE DTPICKER oDate VAR dDate ID 128 OF oDlg UPDATE PICTURE '@D'
REDEFINE BUTTON oBtn1 ID 129 OF oDlg ;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
// end
.rc
- Code: Select all Expand view
TESTDP DIALOG 89, 44, 207, 152
STYLE WS_POPUP | WS_CAPTION
FONT 6, "MS Sans Serif"
{
LTEXT "Blank Date", 132, 6, 40, 84, 11, SS_NOPREFIX | WS_GROUP
CONTROL "", 128, "SysDateTimePick32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 96, 38, 73, 13
PUSHBUTTON "Close", 129, 124, 104, 50, 14
}
Pic of Vb App
Pic of my app