Hi,
I wrote a C# Application "Tool" to change the sShortDate RegKey entry("Control Panel\International") for the CurrentUser to a format which is used by another VB6 Application.
The Tool works on Win7 and the VB6 Application uses the new RegKey.
The problem comes into play when I use the Tool on Win-XP, then the VB6 Application ignores the change and uses the "old" RegKey entry for sShortDate.
When going to Control Panel > Regional Settings and just "re-applying" the sShortDate format which the Tool already set it to, then the VB6 Application uses it...
Why does the RegKey update work on Win7 for all applications started but not on Win-XP?
(I'm calling the user32.dll-SendMessageTimeoutA to let the applications know of the change)
Code Sample below:
Microsoft.Win32.RegistryKey rkey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Control Panel\International", true);
if (rkey != null)
{
rkey.SetValue("sShortDate", dateFormat);
rkey.Close();
}
int dwError = 0;
SendMessageTimeoutA(m_hWnd, m_msg, 0, "International", SMTO_BLOCK, 10000, dwError);
Any idea why the VB6 Application is not taking the new RegKey entry value for the sShortDate would be of great help.
Kind regards,
TiCKoMasta