PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: gian young on September 13, 2007, 02:02:07 AM

Title: Help required with DateTimePicker Control
Post by: gian young on September 13, 2007, 02:02:07 AM
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
Title: Re: Help required with DateTimePicker Control
Post by: Rudolf Fürstauer on September 13, 2007, 04:29:50 AM
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
Title: Re: Help required with DateTimePicker Control
Post by: gian young on September 14, 2007, 01:15:48 AM
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