We have recently upgraded our application from Visual Basic 4 to Visual Basic 6. A text box shows the time, utilizing the format set in the control panel Regional and Language Options. With the time set to h:mm:ss tt, instead of showing AM or PM, the text box displays the "tt" literal. The display was working correctly in VB4; this problem started just since the upgrade.
Here is the code we are using to get the time format:
dl& = GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIMEFORMAT, buffer, 99)
myLocale.TimeFormat = LPSTRToVBString(buffer)
txtTimeS = Format$(Time$, myLocale.TimeFormat)
Does anyone have any idea what is going on or what to do about it?