Subject: Re: time edit component
You don't have to rely on regional settings:
uses
CommCtrl;
SendMessage(DateTimePicker1.Handle, DTM_SETFORMAT, 0,
LongInt(PChar('H:mm')));
>This is governed by your regional settings.
>
>If you set the regional settings "Time Style" to "hh:mm"
>the seconds disappear, as you want it.
>
>I tried overriding this setting with the "ShortTimeFormat" constant
>in Delphi, but it did not work as expected, since the ComCtrls
>unit (which encapsulates TDateTimePicker) seems to obtain the
>regional settings directly from windows, not from the Delphi
>provided constants.
>
>I suppose you can be very naughty and actually change the regional
>settings from your program, then create the TDateTimePicker, then
>set the regional settings back to what they were, but this is
>very bad Windows programming.
>
>
>At 09:16 AM 07/14/98 +0100, you wrote:
>>I use TDateTimePicker to let the user enter a time.
>>I don't want the 'seconds' to be shown.
>>
>>Is that possible, or does anyone know an other component
>>to enter a time without the seconds part?
----------