|
|
|
|
|
Dicas
|
|
Visual Basic (Windows)
|
|
|
Título da Dica: Mudar a definição de data do Windows
|
|
|
|
Postada em 14/8/2000 por Webmaster
webmaster@vbweb.com.br
Private Declare Function SetLocaleInfo Lib "kernel32" _ Alias "SetLocaleInfoA" (ByVal Locale As Long, _ ByVal LCType As Long, ByVal lpLCData As String) _ As Boolean Private Declare Function PostMessage Lib "user32" Alias _ "PostMessageA" (ByVal hwnd As Long, ByVal wMsg _ As Long, ByVal wParam As Long, ByVal lParam As _ Long) As Long Private Declare Function GetSystemDefaultLCID Lib _ "kernel32" () As Long
Private Const LOCALE_SSHORTDATE As Long = &H1F Private Const WM_SETTINGCHANGE As Long = &H1A Private Const HWND_BROADCAST As Long = &HFFFF&
Private Sub Command1_Click() Dim dwLCID As Long
dwLCID = GetSystemDefaultLCID() If SetLocaleInfo(dwLCID,LOCALE_SSHORTDATE,"dd/mmm/yyyy")=False Then MsgBox "Erro na definição da data." Exit Sub End If PostMessage HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0 End Sub
|
|
|
|
|