Re: Setting Long - Short Date format in Date Time Settings
Ok then.
Paste this into a new project and run it.
VB Code:
Const LOCALE_SSHORTDATE = &H1F
Private Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long
Private Declare Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Boolean
Command1 sets up MM/dd/yyyy and Command2 sets up dd/MM/yyyy.
As a test, run the code and do the following in order.
1. Click Command 1
2. Open a new instance of MSWord and press <SHIFT><ALT>D to enter a date.
3. Close MSWord
4. Click Command 2
5. Open a new instance of MSWord and press <SHIFT><ALT>D to enter a date.
The reason you have to open and close MSWord is that it appears to only pick up the date format when it is opened, not when the format changes.
This world is not my home. I'm just passing through.