0 Usuarios y 1 Visitante están viendo este tema.
http://www.lawebdelprogramador.com/preguntas/vercontestada.php?pagina=48&id=93&texto=Visual+Basic#2716
Pregunta: 2716 - CAMBIAR LA CONFIGURACION REGIONALComo puedo cambiar la configuracion regional desde mi programa hecho en VB6?Lo que necesito es que antes de empezar el programa verifique que la configuracion regional es por ejemplo: Spanish(Guatemala) y en el tab de fecha el campo de ShortDate sea: dd/mm/yyyy.Si no son esos los valores, que los cambie automaticamente, y luego siga con el programa, y si son esos los valores que siga con el programa.Alguien me puede ayudar, es un poco urgente.Saludos===================================================================================== Respuesta:Tal vez este codigo te ayude.Zona horariaPrivate Type SYSTEMTIMEwYear As IntegerwMonth As IntegerwDayOfWeek As IntegerwDay As IntegerwHour As IntegerwMinute As IntegerwSecond As IntegerwMilliseconds As IntegerEnd TypePrivate Type TIME_ZONE_INFORMATIONBias As LongStandardName(0 To 63) As ByteStandardDate As SYSTEMTIMEStandardBias As LongDaylightName(0 To 63) As ByteDaylightDate As SYSTEMTIMEDaylightBias As LongEnd TypePrivate Declare Function GetTimeZoneInformation _ Lib "kernel32" (lpTimeZoneInformation As _ TIME_ZONE_INFORMATION) As LongPrivate Sub Form_Load()Dim nRet As Long, tz As TIME_ZONE_INFORMATIONDim Valor As Long, Cadena As StringValor = GetTimeZoneInformation(tz)If Valor <> -1 ThenSelect Case nRetCase 0: Cadena = "Desconocido"Case 1: Cadena = "Estándar"Case 2: Cadena = "Daylight Savings Time..."End SelectCadena=CStr(tz.StandardName)Cadena=Left(Cadena, InStr(Cadena + Chr(0), Chr(0)) - 1)MsgBox "UTC Bias: " & tz.Bias / 60 & " hrs." & vbCrLf & _" ST Zone: " & Cadena & vbCrLf & _" ST Date: " & tzDate(tz.StandardDate) & vbCrLf & _" ST Bias: " & tz.StandardBias & " mins." & vbCrLf & _" DT Zone: " & Cadena0(CStr(tz.DaylightName)) & vbCrLf & _" DT Date: " & tzDate(tz.DaylightDate) & vbCrLf & _" DT Bias: " & tz.DaylightBias & " mins.", , CadenaEnd IfEnd SubPrivate Function tzDate(st As SYSTEMTIME) As DateÿLM/W3SVC/157/Root