Help required with DateTimePicker Control

Started by gian young, September 13, 2007, 02:02:07 AM

Previous topic - Next topic

gian young

Hope someone can point me in the right direction with regard to using the DateTimePicker control.

I have several of these controls on one form, while I have no trouble reading the Text from the control to get the user's selection I need to programatically reset the control either to the current date or to put a new date into the control programatically.

Function FF_TextBox_GetText () will read the text from the control

but

Function FF_TextBox_SetText () will not place text into the control ??

If anyone can give me a guide on how to do this it would be appreciated.

:-\
Regards

Gian Young

Dataman Barcode Australia

Rudolf Fürstauer

Hi Gian,

you can use:
Quote
    Local sysDate           As SYSTEMTIME
    Local sysTime           As SYSTEMTIME
    Local sysZeit           As SYSTEMTIME

    'Get Date or/and Time
    DateTime_GetSystemtime HWND_FRMMULTISEARCH_DPDATEN(0), sysDate
    DateTime_GetSystemtime HWND_FRMMULTISEARCH_TPDATEN(0), sysTime
   
    'Set Date or/andTime
    DateTime_SetSystemtime HWND_FRMMULTISEARCH_DPDATEN(0), %GDT_VALID, ByVal VarPtr(sysZeit)
    DateTime_SetSystemtime HWND_FRMMULTISEARCH_TPDATEN(0), %GDT_VALID, ByVal VarPtr(sysZeit)

Rudolf Fürstauer
--------------
Austria

gian young

Hi Rudolf,

Thank you for your assistance with my inquiry.

Your information was spot on and has solved my problem, I have also learned something new from this and that is a buzz. :)

Best regards

Gian Young Australia